On maximal repetitions in words

  • Roman Kolpakov
  • Gregory Kucherov
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1684)


A (fractional) repetition in a word w is a subword with the period of at most half of the subword length. We study maximal repetitions occurring in w, that is those for which any extended subword of w has a bigger period. The set of such repetitions represents in a compact way all repetitions in w.

We first study maximal repetitions in Fibonacci words — we count their exact number, and estimate the sum of their exponents. These quantities turn out to be linearly-bounded in the length of the word. We then prove that the maximal number of maximal repetitions in general words (on arbitrary alphabet) of length n is linearly-bounded in n, and we mention some applications and consequences of this result.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [AP83]
    A. Apostolico and F.P. Preparata. Optimal off-line detection of repetitions in a string. Theoretical Computer Science, 22(3):297–315, 1983.zbMATHCrossRefMathSciNetGoogle Scholar
  2. [CR94]
    M. Crochemore and W. Rytter. Text algorithms. Oxford University Press, 1994.Google Scholar
  3. [CR95]
    M. Crochemore and W. Rytter. Squares, cubes, and time-space efficient string searching. Algorithmica, 13:405–425, 1995.zbMATHCrossRefMathSciNetGoogle Scholar
  4. [Cro81]
    M. Crochemore. An optimal algorithm for computing the repetitions in a word. Information Processing Letters, 12:244–250, 1981.zbMATHCrossRefMathSciNetGoogle Scholar
  5. [Cro83]
    M. Crochemore. Recherche linèaire d’un carrè dans un mot. Comptes Rendus Acad. Sci. Paris Sèr. I Math., 296:781–784, 1983.zbMATHMathSciNetGoogle Scholar
  6. [CS96]
    J.D. Currie and R.O. Shelton. Cantor sets and Dejean’s conjecture. Journal of Automata, Languages and Combinatorics, 1(2):113–128, 1996.zbMATHMathSciNetGoogle Scholar
  7. [Dej72]
    F. Dejean. Sur un thèorème de Thue. J. Combinatorial Th. (A), 13:90–99, 1972.zbMATHCrossRefMathSciNetGoogle Scholar
  8. [FS95]
    A.S. Fraenkel and J. Simpson. How many squares must a binary sequence contain? Electronic Journal of Combinatorics, 2(R2):9pp, 1995. Scholar
  9. [FS98]
    A.S. Fraenkel and J. Simpson. How many squares can a string contain? J. Combinatorial Theory (Ser. A), 82:112–120, 1998.zbMATHCrossRefMathSciNetGoogle Scholar
  10. [FS99]
    A.S. Fraenkel and J. Simpson. The exact number of squares in Fibonacci words. Theoretical Computer Science, 218(1):83–94, 1999.CrossRefMathSciNetGoogle Scholar
  11. [IMS97]
    C.S. Iliopoulos, D. Moore, and W.F. Smyth. A characterization of the squares in a Fibonacci string. Theoretical Computer Science, 172:281–291, 1997.zbMATHCrossRefMathSciNetGoogle Scholar
  12. [JP99]
    J. Justin and G. Pirillo. Fractional powers in Sturmian words. Technical Report LIAFA 99/01, Laboratoire d’Informatique Algorithmique: Fondements et Applications (LIAFA), 1999.Google Scholar
  13. [KK98]
    R. Kolpakov and G. Kucherov. Maximal repetitions in words or how to find all squares in linear time. Rapport Interne LORIA 98-R-227, Laboratoire Lorrain de Recherche en Informatique et ses Applications, 1998. available from URL:
  14. [Kos94]
    S. R. Kosaraju. Computation of squares in string. In M. Crochemore and D. Gusfield, editors, Proceedings of the 5th Annual Symposium on Combinatorial Pattern Matching, number 807 in Lecture Notes in Computer Science, pages 146–150. Springer Verlag, 1994.Google Scholar
  15. [Lot83]
    M. Lothaire. Combinatorics on Words, volume 17 of Encyclopedia of Mathematics and Its Applications. Addison Wesley, 1983.Google Scholar
  16. [Mai89]
    M. G. Main. Detecting leftmost maximal periodicities. Discrete Applied Mathematics, 25:145–153, 1989.CrossRefMathSciNetzbMATHGoogle Scholar
  17. [ML84]
    M.G. Main and R.J. Lorentz. An O(n log n) algorithm for finding all repetitions in a string. Journal of Algorithms, 5(3):422–432, 1984.zbMATHCrossRefMathSciNetGoogle Scholar
  18. [ML85]
    M.G. Main and R.J. Lorentz. Linear time recognition of square free strings. In A. Apostolico and Z. Galil, editors, Combinatorial Algorithms on Words, volume 12 of NATO Advanced Science Institutes, Series F, pages 272–278. Springer Verlag, 1985.Google Scholar
  19. [MP92]
    F. Mignosi and G. Pirillo. Repetitions in the Fibonacci infinite word. RAIRO Theoretical Informatics and Applications, 26(3):199–204, 1992.zbMATHMathSciNetGoogle Scholar
  20. [MRS95]
    F. Mignosi, A. Restivo, and S. Salemi. A periodicity theorem on words and applications. In Proceedings of the 20th International Symposium on Mathematical Foundations of Computer Science (MFCS), volume 969 of Lecture Notes in Computer Science, pages 337–348. Springer Verlag, 1995.Google Scholar
  21. [Sèè85]
    P. Sèèbold. Propriètès combinatoires des mots infinis engendrès par certains morphismes. Rapport 85-16, LITP, Paris, 1985.Google Scholar
  22. [SG98a]
    J. Stoye and D. Gusfield. Simple and flexible detection of contiguous repeats using a suffix tree. In M. Farach-Colton, editor, Proceedings of the 9th Annual Symposium on Combinatorial Pattern Matching, number 1448 in Lecture Notes in Computer Science, pages 140–152. Springer Verlag, 1998.CrossRefGoogle Scholar
  23. [SG98b]
    J. Stoye and D. Gusfield. Linear time algorithms for finding and representing all the tandem repeats in a string. Technical Report CSE-98-4, Computer Science Department, University of California, Davis, 1998.Google Scholar
  24. [Sli83]
    A.O. Slisenko. Detection of periodicities and string matching in real time. Journal of Soviet Mathematics, 22:1316–1386, 1983.zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Roman Kolpakov
    • 1
  • Gregory Kucherov
    • 2
  1. 1.French-Russian Institute for Informatics and Applied MathematicsMoscow UniversityMoscowRussia
  2. 2.LORIA/INRIA-LorraineVillers-lès-NancyFrance

Personalised recommendations