Keywords and Synonyms
Powers; Runs; Tandem repeats
Problem Definition
Periodicities and repetitions in strings have been extensively studied and are important both in theory and practice (combinatorics of words, pattern‐matching, computational biology). The words of the type ww and www, where w is a nonempty primitive (not of the form u k for an integer \( { k > 1 } \)) word, are called squares and cubes, respectively. They are well‐investigated objects in combinatorics on words [16] and in string‐matching with small memory [5].
A string w is said to be periodic iff \( { period(w)\le |w|/2 } \), where period(w) is the smallest positive integer p for which \( { w[i]=w[i+p] } \) whenever both sides of the equality are defined. In particular each square and cube is periodic.
A repetition in a string \( { x = x_1 x_2 \dots x_n } \) is an interval \( { [i\mathinner{\ldotp\ldotp} j]\subseteq[1\mathinner{\ldotp\ldotp} n] } \) for which the associated factor \( { x[i\mathinner{\ldotp\ldotp} j]...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Recommended Reading
Apostolico, A., Preparata, F.P.: Optimal off-line detection of repetitions in a string. Theor. Comput. Sci. 22(3), 297–315 (1983)
Crochemore, M.: An optimal algorithm for computing the repetitions in a word. Inform. Process. Lett. 12(5), 244–250 (1981)
Crochemore, M. : Transducers and repetitions. Theor. Comput. Sci. 45(1), 63–86 (1986)
Crochemore, M., Ilie, L.: Analysis of maximal repetitions in strings. J. Comput. Sci. (2007)
Crochemore, M., Rytter, W.: Squares, cubes, and time-space efficient string searching. Algorithmica 13(5), 405–425 (1995)
Crochemore, M., Rytter, W.: Jewels of stringology. World Scientific, Singapore (2003)
Franek, F., Karaman, A., Smyth, W.F.: Repetitions in Sturmian strings. Theor. Comput. Sci. 249(2), 289–303 (2000)
Fraenkel, A.S., Simpson, R.J.: How many squares can a string contain? J. Comb. Theory Ser. A 82, 112–120 (1998)
Fraenkel, A.S., Simpson, R.J.: The Exact Number of Squares in Fibonacci Words. Theor. Comput. Sci. 218(1), 95–106 (1999)
Franek, F., Simpson, R.J. , and Smyth, W.F.: The maximum number of runs in a string. In: Proc. 14-th Australian Workshop on Combinatorial Algorithms, pp. 26–35. Curtin University Press, Perth (2003)
Franek, F., Smyth, W.F., Tang, Y.: Computing all repeats using suffix arrays. J. Autom. Lang. Comb. 8(4), 579–591 (2003)
Gusfield, D.and Stoye, J.: Linear time algorithms for finding and representing all the tandem repeats in a string. J. Comput. Syst. Sci. 69(4), 525–546 (2004)
Ilie, L.: A simple proof that a word of length n has at most 2n distinct squares. J. Combin. Theory, Ser. A 112(1), 163–164 (2005)
Iliopoulos, C., Moore, D., Smyth, W.F.: A characterization of the squares in a Fibonacci string. Theor. Comput. Sci. 172 281–291 (1997)
Kolpakov, R., Kucherov, G.: Finding maximal repetitions in a word in linear time. In: Proceedings of the 40th Symposium on Foundations of Computer Science, pp. 596–604. IEEE Computer Society Press, Los Alamitos (1999)
Lothaire, M. (ed.): Algebraic Combinatorics on Words. Cambridge University Press, Cambridge (2002)
Lothaire, M. (ed.): Applied Combinatorics on Words. Cambridge University Press, Cambridge (2005)
Main, M.G.: Detecting leftmost maximal periodicities. Discret. Appl. Math. 25, 145–153 (1989)
Main, M.G., Lorentz, R.J.: An \( { O(n \log n) } \) algorithm for finding all repetitions in a string. J. Algorithms 5(3), 422–432 (1984)
Rytter, W.: The structure of subword graphs and suffix trees of Fibonacci words. In: Implementation and Application of Automata, CIAA 2005. Lecture Notes in Computer Science, vol. 3845, pp. 250–261. Springer, Berlin (2006)
Rytter, W.: The Number of Runs in a String: Improved Analysis of the Linear Upper Bound. In: Proceedings of the 23rd Annual Symposium on Theoretical Aspects of Computer Science. Lecture Notes in Computer Science, vol. 3884, pp. 184–195. Springer, Berlin (2006)
Smyth, W.F.: Repetitive perhaps, but certainly not boring. Theor. Comput. Sci. 249(2), 343–355 (2000)
Smyth, W.F.: Computing patterns in strings. Addison‐Wesley, Boston, MA (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag
About this entry
Cite this entry
Crochemore, M., Rytter, W. (2008). Squares and Repetitions. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-30162-4_392
Download citation
DOI: https://doi.org/10.1007/978-0-387-30162-4_392
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-30770-1
Online ISBN: 978-0-387-30162-4
eBook Packages: Computer ScienceReference Module Computer Science and Engineering