Covering a string
We consider the problem of finding the repetitive structures of a given string x. The period u of the string x grasps the repetitiveness of x, since x is a prefix of a string constructed by concatenations of u. We generalize the concept of repetitiveness as follows: A string w covers a string x if there exists a string constructed by concatenations and superpositions of w of which x is a substring. A substring w of x is called a seed of x if w covers x. We present an O(n log n) time algorithm for finding all the seeds of a given string of length n.
KeywordsCombinatorial algorithms on words string algorithms periodicity of strings covering of strings partitioning
Unable to display preview. Download preview PDF.
- A. V. Aho, J. E. Hopcroft and J. D. Ullman, “The Design and Analysis of Computer Algorithms,” Addison-Wesley, 1974.Google Scholar
- A. Apostolico and A. Ehrenfeucht, Efficient detection of quasiperiodicities in strings, to appear in Theoret. Comput. Sci. Google Scholar
- A. Apostolico, M. Farach and C. S. Iliopoulos, Optimal superprimitivity testing for strings, Inform. Process. Lett. 39 (1991), 17–20.Google Scholar
- A. Apostolico and F. P. Preparata, Optimal off-line detection of repetitions in a string, Theoret. Comput. Sci. 22 (1983), 297–315.Google Scholar
- 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.Google Scholar
- M. Crochemore, An optimal algorithm for computing the repetitions in a word, Inform. Process. Lett. 12 (1981), 244–250.Google Scholar
- M. Crochemore, Transducers and repetitions, Theoret. Comput. Sci. 45 (1986), 63–86.Google Scholar
- J. E. Hopcroft, An n log n algorithm for minimizing states in a finite automaton, in Kohavi and Paz, ed., “Theory of Machines and Computations,” Academic Press, New York, 1971, pp. 189–196.Google Scholar
- D. E. Knuth, J. H. Morris aud V. R. Pratt, Fast pattern matching in strings, SIAM J. Comput. 6 (1977), 323–350.Google Scholar