Computing the Maximal-Exponent Repeats of an Overlap-Free String in Linear Time

  • Golnaz Badkobeh
  • Maxime Crochemore
  • Chalita Toopsuwan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7608)


The exponent of a string is the quotient of the string’s length over the string’s smallest period. The exponent and the period of a string can be computed in time proportional to the string’s length. We design an algorithm to compute the maximal exponent of factors of an overlap-free string. Our algorithm runs in linear-time on a fixed-size alphabet, while a naive solution of the question would run in cubic time. The solution for non overlap-free strings derives from algorithms to compute all maximal repetitions, also called runs, occurring in the string. We show there is a linear number of maximal-exponent repeats in an overlap-free string. The algorithm can locate all of them in linear time.


Linear Time String Length Maximal Repetition Input String Alphabet Size 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bell, T.C., Cleary, J.G., Witten, I.H.: Text compression. Prentice-Hall, Englewood Cliffs (1990)Google Scholar
  2. 2.
    Berkman, O., Iliopoulos, C.S., Park, K.: The subtree max gap problem with application to parallel string covering. Information and Computation 123(1), 127–137 (1995)MathSciNetzbMATHCrossRefGoogle Scholar
  3. 3.
    Brodal, G.S., Lyngsø, R.B., Pedersen, C.N.S., Stoye, J.: Finding Maximal Pairs with Bounded Gap. In: Crochemore, M., Paterson, M. (eds.) CPM 1999. LNCS, vol. 1645, pp. 134–149. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  4. 4.
    Brodal, G.S., Pedersen, C.N.S.: Finding Maximal Quasiperiodicities in Strings. In: Giancarlo, R., Sankoff, D. (eds.) CPM 2000. LNCS, vol. 1848, pp. 397–411. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  5. 5.
    Christou, M., Crochemore, M., Iliopoulos, C.S., Kubica, M., Pissis, S.P., Radoszewski, J., Rytter, W., Szreder, B., Waleń, T.: Efficient Seeds Computation Revisited. In: Giancarlo, R., Manzini, G. (eds.) CPM 2011. LNCS, vol. 6661, pp. 350–363. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  6. 6.
    Crochemore, M., Hancart, C., Lecroq, T.: Algorithms on Strings, 392 pages. Cambridge University Press (2007)Google Scholar
  7. 7.
    Crochemore, M., Ilie, L.: Maximal repetitions in strings. Journal of Computer and System Sciences 74, 796–807 (2008), doi:10.1016/j.jcss.2007.09.003MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Crochemore, M., Ilie, L., Tinta, L.: The “runs” conjecture. Theoretical Computer Science 412(27), 2931–2941 (2011)MathSciNetzbMATHCrossRefGoogle Scholar
  9. 9.
    Crochemore, M., Tischler, G.: Computing longest previous non-overlapping factors. Information Processing Letters 111, 291–295 (2011)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Currie, J.D., Rampersad, N.: A proof of Dejean’s conjecture. Mathematics of Computation 80(274), 1063–1070 (2011)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Dejean, F.: Sur un théorème de Thue. Journal of Combinatorial Theory, Series A 13(1), 90–99 (1972)MathSciNetzbMATHCrossRefGoogle Scholar
  12. 12.
    Gusfield, D.: Algorithms on strings, trees and sequences: computer science and computational biology. Cambridge University Press, Cambridge (1997)zbMATHCrossRefGoogle Scholar
  13. 13.
    Iliopoulos, C.S., Moore, D.W.G., Park, K.: Covering a string. Algorithmica 16(3), 288–297 (1996)MathSciNetzbMATHCrossRefGoogle Scholar
  14. 14.
    Kolpakov, R., Kucherov, G.: On maximal repetitions in words. Journal of Discrete Algorithms 1(1), 159–186 (2000)MathSciNetGoogle Scholar
  15. 15.
    Kolpakov, R., Kucherov, G., Ochem, P.: On maximal repetitions of arbitrary exponent. Information Processing Letters 110(7), 252–256 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  16. 16.
    Rao, M.: Last cases of Dejean’s conjecture. Theoretical Computer Science 412(27), 3010–3018 (2011)MathSciNetzbMATHCrossRefGoogle Scholar
  17. 17.
    Rytter, W.: The number of runs in a string. Information and Computation 205(9), 1459–1469 (2007)MathSciNetzbMATHCrossRefGoogle Scholar
  18. 18.
    Thue, A.: Über unendliche Zeichenreihen. Norske Vid. Selsk. Skr. I Math-Nat. Kl. 7, 1–22 (1906)Google Scholar
  19. 19.
    Ziv, J., Lempel, A.: A universal algorithm for sequential data compression 23, 337–343 (1977)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Golnaz Badkobeh
    • 1
  • Maxime Crochemore
    • 1
    • 2
  • Chalita Toopsuwan
    • 1
  1. 1.King’s College LondonUK
  2. 2.Université Paris-EstFrance

Personalised recommendations