Abstract
We consider the problem of finding the repetitive structures of a given stringx. The periodu of the stringx grasps the repetitiveness ofx, sincex is a prefix of a string constructed by concatenations ofu. We generalize the concept of repetitiveness as follows: A stringw covers a stringx if there is a superstring ofx which is constructed by concatenations and superpositions ofw. A substringw ofx is called aseed ofx ifw coversx. We present anO(n logn)-time algorithm for finding all the seeds of a given string of lengthn.
Similar content being viewed by others
References
A. V. Aho, J. E. Hopcroft and J. D. Ullman,The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.
A. Apostolico and A. Ehrenfeucht, Efficient detection of quasiperiodicities in strings,Theoret. Comput. Sci.119 (1993), 247–265.
A. Apostolico, M. Farach, and C. S. Iliopoulos, Optimal superprimitivity testing for strings,Inform. Process. Lett.39 (1991), 17–20.
A. Apostolico and F. P. Preparata, Optimal off-line detection of repetitions in a string,Theoret. Comput. Sci.22 (1983), 297–315.
A. M. Ben-Amram, O. Berkman, C. S. Iliopoulos, and K. Park, The subtree max gap problem with application to parallel string covering,Proc. 5th ACM-SIAM Symp. on Discrete Algorithms, 1994, pp. 501–510.
A. Blumer, J. Blumer, D. Haussler, A. Ehrenfeucht, M. T. Chen, and J. Seiferas, The smallest automaton recognizing the subwords of a text,Theoret. Comput. Sci.40 (1985), 31–55.
D. Breslauer, An on-line string superprimitivity test,Inform. Process. Lett. 44 (1992), 345–347.
M. Crochemore, An optimal algorithm for computing the repetitions in a word,Inform. Process. Lett. 12 (1981), 244–250.
M. Crochemore, Transducers and repetitions,Theoret. Comput. Sci. 45 (1986), 63–86.
J. E. Hopcroft, Ann logn algorithm for minimizing states in a finite automaton, in Kohavi and Paz, eds.,Theory of Machines and Computations, Academic Press, New York, 1971, pp. 189–196.
D. E. Knuth, J. H. Morris and V. R. Pratt, Fast pattern matching in strings,SIAM J. Comput. 6 (1977), 323–350.
Author information
Authors and Affiliations
Additional information
Communicated by J.-D. Boissonnat.
Partially supported by SERC Grants GR/F 00898 and GR/J 17844, NATO Grant CRG 900293, ESPRIT BRA Grant 7131 for ALCOMII, and MRC Grant G 9115730.
Partially supported by MRC Grant G 9115730 and S.N.U. Posco Research Fund 94-15-1112.
Rights and permissions
About this article
Cite this article
Iliopoulos, C.S., Moore, D.W.G. & Park, K. Covering a string. Algorithmica 16, 288–297 (1996). https://doi.org/10.1007/BF01955677
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01955677