A New Periodicity Lemma

  • Kangmin Fan
  • William F. Smyth
  • R. J. Simpson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3537)


Given a string x = x[1..n], a repetition of period p in x is a substring u r  = x[i..i + rp − 1], p = |u|, r ≥ 2, where neither u = x[i..i + p − 1] nor x[i..i + (r + 1)p − 1] is a repetition. The maximum number of repetitions in any string x is well known to be Θ(nlog n). A run or maximal periodicity of period p in x is a substring u r t = x[i..i + rp + |t| − 1] of x, where u r is a repetition, t a proper prefix of x, and no repetition of period p begins at position i – 1 of x or ends at position i + rp + |t|. In 2000 Kolpakov and Kucherov showed that the maximum number ρ(n) of runs in any string x is O(n), but their proof was nonconstructive and provided no specific constant of proportionality. At the same time, they presented experimental data strongly suggesting that ρ(n) < n. In this paper, as a first step toward proving this conjecture, we present a periodicity lemma that establishes limitations on the number of squares, and their periods, that can occur over a specified range of positions in x. We then apply this result to specify corresponding limitations on the occurrence of runs.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Apostolico, A., Preparata, F.P.: Optimal off-line detection of repetitions in a string. Theoret. Comput. Sci. 22, 297–315 (1983)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Crochemore, M.: An optimal algorithm for computing the repetitions in a word. Inform. Process. Lett. 12(5), 244–250 (1981)zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Farach, M.: Optimal suffix tree construction with large alphabets. In: Proc. 38th IEEE Symp. Found. Computer Science, pp. 137–143 (1997)Google Scholar
  4. 4.
    Fine, N.J., Wilf, H.S.: Uniqueness theorems for periodic functions. Proc. Amer. Math. Soc. 16, 109–114 (1965)zbMATHMathSciNetCrossRefGoogle Scholar
  5. 5.
    Franek, F., Simpson, R.J., Smyth, W.F.: The maximum number of runs in a string. In: Miller, M., Park, K. (eds.) Proc. 14th Australasian Workshop on Combinatorial Algorithms, pp. 26–35 (2003)Google Scholar
  6. 6.
    Kärkkäinen, J., Sanders, P.: Simple linear work suffix array construction. In: Baeten, J.C.M., Lenstra, J.K., Parrow, J., Woeginger, G.J. (eds.) ICALP 2003. LNCS, vol. 2719, pp. 943–955. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  7. 7.
    Ko, P., Aluru, S.: Space efficient linear time construction of suffix arrays. In: Baeza-Yates, R., Chávez, E., Crochemore, M. (eds.) CPM 2003. LNCS, vol. 2676, pp. 200–210. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Kolpakov, R., Kucherov, G.: On maximal repetitions in words. J. Discrete Algs. 1, 159–186 (2000)MathSciNetGoogle Scholar
  9. 9.
    Lempel, A., Ziv, J.: On the complexity of finite sequences. IEEE Trans. Information Theory 22, 75–81 (1976)zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Lothaire, M.: Algebraic Combinatorics on Words, p. 504. Cambridge University Press, Cambridge (2002)zbMATHGoogle Scholar
  11. 11.
    Main, M.G.: Detecting leftmost maximal periodicities. Discrete Applied Maths. 25, 145–153 (1989)zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Main, M.G., Lorentz, R.J.: An O(n log n) algorithm for finding all repetitions in a string. J. Algs. 5, 422–432 (1984)zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    McCreight, E.M.: A space-economical suffix tree construction algorithm. J. Assoc. Comput. Mach. 32(2), 262–272 (1976)MathSciNetGoogle Scholar
  14. 14.
    Smyth, B.: Computing Patterns in Strings, p. 423. Pearson Addison-Wesley, London (2003)Google Scholar
  15. 15.
    Thue, A.: Über unendliche zeichenreihen, Norske Vid. Selsk. Skr. I. Mat. Nat. Kl. Christiana 7, 1–22 (1906)Google Scholar
  16. 16.
    Weiner, P.: Linear pattern matching algorithms. In: Proc. 14th Annual IEEE Symp. Switching & Automata Theory, pp. 1–11 (1973)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Kangmin Fan
    • 1
  • William F. Smyth
    • 1
    • 2
  • R. J. Simpson
    • 3
  1. 1.Algorithms Research Group, Department of Computing & SoftwareMcMaster UniversityHamiltonCanada
  2. 2.Department of ComputingCurtin UniversityPerthAustralia
  3. 3.Department of Mathematics & StatisticsCurtin UniversityPerthAustralia

Personalised recommendations