A Fast Equivalence-Checking Algorithm for Circular Lists
暂无分享,去创建一个
We assume that the elements of A and B are wellordered so that any comparison between two elements a and b yields one of the three results a < b, c > b, or a = b. Furthermore, we will assume (without loss of generality) that these elements are real numbers and the order is the natural one. In this paper we present an algorithm that usetl at most 3n 3 comparisons in order to check equivalence. Our algorithm not only deals with a very fundamental data-processing problem but also has immediate applications to other problems. It can be used for exam;$e to improve the time bounds of the problem of checking similarity of two polygons. The prescrnt most efficient algorithms that solve this problem [I 4, employ the fast pattern-matching algorithm of Knuth, Morris, and Pratt [3] to check equivalence of two circular lists. The KMP algorithm, when
[1] Donald E. Knuth,et al. Fast Pattern Matching in Strings , 1977, SIAM J. Comput..
[2] Selim G. Akl,et al. An Improved Algorithm to Check for Polygon Similarity , 1978, Inf. Process. Lett..
[3] Glenn K. Manacher,et al. An Application of Pattern Matching to a Problem in Geometrical Complexity , 1976, Inf. Process. Lett..