Abstract
A q-repetition is the concatenation of q copies of a primitive string, where q≥2. Given a string S character by character, the on-line repetition detection problem is to determine whether S contains a q-repetition in an on-line manner. For q=2, the problem can be solved in O(mlogβ) time, where m is the ending position of the first 2-repetition and β is the number of distinct characters in the m-th prefix of S. In this paper, we present an on-line algorithm that can detect a q-repetition for q≥3 with the same time complexity.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Apostolico, A., Preparata, F.P.: Optimal off-line detection of repetitions in a string. Theoretical Computer Science 22, 297–315 (1983)
Chen, G.-H., Hong, J.-J., Lu, H.-I.: An optimal algorithm for online square detection. In: Apostolico, A., Crochemore, M., Park, K. (eds.) CPM 2005. LNCS, vol. 3537, pp. 280–287. Springer, Heidelberg (2005)
Crochemore, M.: An optimal algorithm for computing the repetitions in a word. Information Processing Letters 12(5), 244–250 (1981)
Crochemore, M.: Recherche linéaire d’un carré dans un mot. Comptes Rendus des Séances de l’Académie des Sciences. Série I. Mathématique 296(18), 781–784 (1983)
Crochemore, M.: Transducers and repetitions. Theoretical Computer Science 45(1), 63–86 (1986)
Crochemore, M., Rytter, W.: Squares, cubes, and time—space efficient string searching. Algorithmica 13(5), 405–425 (1995)
Farach, M., Thorup, M.: String matching in Lempel-Ziv compressed strings. Algorithmica 20(4), 388–404 (1998)
Fine, N.J., Wilf, H.S.: Uniqueness theorem for periodic functions. Proceedings of the American Mathematical Society 16(1), 109–114 (1965)
Gusfield, D.: Algorithms on strings, trees, and sequences: computer science and computational biology. Cambridge University Press, Cambridge (1997)
Harrison, M.A.: Introduction to Formal Language Theory. Addison-Wesley, Reading (1978)
Kolpakov, R.M., Kucherov, G.: Finding repeats with fixed gap. In: Proceedings of the 7th International Symposium on String Processing Information Retrieval (SPIRE), pp. 162–168 (2000)
Kolpakov, R.M., Kucherov, G.: Finding approximate repetitions under Hamming distance. Theoretical Computer Science 303(1), 135–156 (2003)
Leung, H.-f., Peng, Z., Ting, H.-F.: An efficient online algorithm for square detection. In: Chwa, K.-Y., Munro, J.I.J. (eds.) COCOON 2004. LNCS, vol. 3106, pp. 432–439. Springer, Heidelberg (2004)
Lothaire, M.: Applied Combinatorics on Words. Cambridge University Press, Cambridge (2005)
Main, M.G., Lorentz, R.J.: An O(nlogn) algorithm for finding all repetitions in a string. Journal of Algorithms 5(3), 422–432 (1984)
Main, M.G., Lorentz, R.J.: Linear time recognition of squarefree strings. In: Apostolico, A., Galil, Z. (eds.) Combinatorial Algorithms on Words. NATO ASI Series, vol. F12, pp. 271–278. Springer, Heidelberg (1985)
Morris Jr., J.H., Pratt, V.R.: A linear pattern-matching algorithm. Technical Report 40, University of California, Berkeley (1970)
Ross, R.J., Winklmann, K.: Repetitive strings are not context-free. Informatique Théorique et Applications 16(3), 191–199 (1982)
Stoye, J., Gusfield, D.: Simple and flexible detection of contiguous repeats using a suffix tree. Theoretical Computer Science 270(1-2), 843–856 (2002)
Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14(3), 249–260 (1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hong, JJ., Chen, GH. (2006). On-Line Repetition Detection. In: Crestani, F., Ferragina, P., Sanderson, M. (eds) String Processing and Information Retrieval. SPIRE 2006. Lecture Notes in Computer Science, vol 4209. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11880561_7
Download citation
DOI: https://doi.org/10.1007/11880561_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-45774-9
Online ISBN: 978-3-540-45775-6
eBook Packages: Computer ScienceComputer Science (R0)