OPTIMAL PARALLEL DETECTION OF SQUARES IN STRINGS

被引:13
作者
APOSTOLICO, A [1 ]
机构
[1] UNIV LAQUILA,DIPARTIMENTO MATEMAT PURA & APPL,I-67100 LAQUILA,ITALY
关键词
PARALLEL COMPUTATION; COMBINATORIAL ALGORITHMS ON WORDS; STRING MATCHING; AVOIDABLE REGULARITIES; SQUARES AND REPETITIONS IN A STRING;
D O I
10.1007/BF01758848
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
A string w is primitive if it is not a power of another string (i.e., writing w = v(k) implies k = 1. Conversely, w is a square if w = vv, with v a primitive string. A string x is square-free if it has no nonempty substring of the form ww. It is shown that the square-freedom of a string of n symbols over an arbitrary alphabet can be tested by a CRCW PRAM with n processors in O(log n) time and linear auxiliary space. If the cardinality of the input alphabet is bounded by a constant independent of the input size, then the number of processors can be reduced to n/log n without affecting the time complexity of this strategy. The fastest sequential algorithms solve this problem O(n log n) or O(n) time, depending on whether the cardinality of the input alphabet is unbounded or bounded, and either performance is known to be optimal within its class. More elaborate constructions lead to a CRCW PRAM algorithm for detecting, within the same n-processors bounds, all positioned squares in x in time O(log n) and using linear auxiliary space. The fastest sequential algorithms solve this problem in O(n log n) time, and such a performance is known to be optimal.
引用
收藏
页码:285 / 319
页数:35
相关论文
共 21 条
[1]   EFFICIENT PARALLEL ALGORITHMS FOR STRING EDITING AND RELATED PROBLEMS [J].
APOSTOLICO, A ;
ATALLAH, MJ ;
LARMORE, LL ;
MCFADDIN, S .
SIAM JOURNAL ON COMPUTING, 1990, 19 (05) :968-988
[2]   STRUCTURAL-PROPERTIES OF THE STRING STATISTICS PROBLEM [J].
APOSTOLICO, A ;
PREPARATA, FP .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1985, 31 (03) :394-411
[3]   PARALLEL CONSTRUCTION OF A SUFFIX TREE WITH APPLICATIONS [J].
APOSTOLICO, A ;
ILIOPOULOS, C ;
LANDAU, GM ;
SCHIEBER, B ;
VISHKIN, U .
ALGORITHMICA, 1988, 3 (03) :347-365
[4]  
APOSTOLICO A, 1984, RAIRO-INF THEOR APPL, V18, P147
[5]  
APOSTOLICO A, 1985, NATO ASI SERIES F, V12
[6]  
APOSTOLICO A, 1988, 2LTH P ANN ALL C COM, P253
[7]  
Berkman O., 1989, Proceedings of the Twenty First Annual ACM Symposium on Theory of Computing, P309, DOI 10.1145/73007.73036
[8]   FREE DIFFERENTIAL CALCULUS .4. THE QUOTIENT GROUPS OF THE LOWER CENTRAL SERIES [J].
CHEN, KT ;
FOX, RH ;
LYNDON, RC .
ANNALS OF MATHEMATICS, 1958, 68 (01) :81-95
[9]  
CROCHEMORE M, 1983, CR ACAD SCI I-MATH, V296, P781
[10]   USEFULNESS OF THE KARP-MILLER-ROSENBERG ALGORITHM IN PARALLEL COMPUTATIONS ON STRINGS AND ARRAYS [J].
CROCHEMORE, M ;
RYTTER, W .
THEORETICAL COMPUTER SCIENCE, 1991, 88 (01) :59-82