Computing Primitively-Rooted Squares and Runs in Partial Words
This paper deals with two types of repetitions in strings: squares, which consist of two adjacent occurrences of substrings, and runs, which are periodic substrings that cannot be extended further to the left or right. We show how to compute all the primitively-rooted squares in a given partial word, which is a sequence that may have undefined positions, called holes or wildcards, that match any letter of the alphabet over which the sequence is defined. We also describe an algorithm for computing all primitively-rooted runs in a given partial word.
- 11.Fischer, M., Paterson, M.: String matching and other products. In: Karp, R. (ed.) 7th SIAM-AMS Complexity of Computation, pp. 113–125 (1974)Google Scholar
- 14.Kolpakov, R., Kucherov, G.: Finding maximal repetitions in a string in linear time. In: FOCS 1999, pp. 596–604. IEEE Computer Society Press, Los Alamitos (1999)Google Scholar