Skip to main content

A Minimal Periods Algorithm with Applications

  • Conference paper
Combinatorial Pattern Matching (CPM 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6129))

Included in the following conference series:

Abstract

Kosaraju in “Computation of squares in a string” briefly described a linear-time algorithm for computing the minimal squares starting at each position in a word. Using the same construction of suffix trees, we generalize his result and describe in detail how to compute the minimal α power, with a period of length longer than s, starting at each position in a word w for arbitrary exponent α> 1 and integer s ≥ 0. The algorithm runs in O(α|w|)-time for s = 0 and in O(|w|2)-time otherwise. We provide a complete proof of the correctness and computational complexity of the algorithm. The algorithm can be used to detect certain types of pseudo-patterns in words, which was our original goal in studying this generalization.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Apostolico, A., Preparata, F.P.: Optimal off-line detection of repetitions in a string. Theoret. Comput. Sci. 22, 297–315 (1983)

    Article  MATH  MathSciNet  Google Scholar 

  2. Beauquier, D., Nivat, M.: On translating one polyomino to tile the plane. Discrete Comput. Geom. 6(1), 575–592 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  3. Chiniforooshan, E., Kari, L., Xu, Z.: Pseudo-power avoidance. CoRR abs/0911. 2233 (2009), http://arxiv.org/abs/0911.2233

  4. Crochemore, M.: Optimal algorithm for computing the repetitions in a word. Info. Proc. Lett. 12(5), 244–250 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  5. Crochemore, M.: Recherche linéaire d’un carré dans un mot. Comptes Rendus Acad. Sci. Paris Sér. I 296, 781–784 (1983)

    MATH  MathSciNet  Google Scholar 

  6. Crochemore, M., Ilie, L., Rytter, W.: Repetitions in strings: Algorithms and combinatorics. Theoret. Comput. Sci. 410(50), 5227–5235 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  7. Duval, J., Kolpakov, R., Kucherov, G., Lecroq, T., Lefebvre, A.: Linear-time computation of local periods. Theoret. Comput. Sci. 326, 229–240 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  8. Fraenkel, A.S., Simpson, J.: How many squares can a string contain? J. Combin. Theory Ser. A 82(1), 112–120 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  9. Gusfield, D.: Algorithms on strings, trees, and sequences: computer science and computational biology. Cambridge University Press, Cambridge (1997)

    MATH  Google Scholar 

  10. Gusfield, D., 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)

    Article  MATH  MathSciNet  Google Scholar 

  11. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  12. Ilie, L.: A note on the number of squares in a word. Theoret. Comput. Sci. 380(3), 373–376 (2007)

    Article  MATH  MathSciNet  Google Scholar 

  13. Knuth, D., Morris, J., Pratt, V.: Fast pattern matching in strings. SIAM J. Comput. 6(2), 323–350 (1977)

    Article  MATH  MathSciNet  Google Scholar 

  14. Kolpakov, R., Kucherov, G.: Finding maximal repetitions in a word in linear time. In: Proc. 40th Ann. Symp. Found. Comput. Sci (FOCS 1999), pp. 596–604. IEEE Computer Society Press, Los Alamitos (1999)

    Google Scholar 

  15. Kosaraju, S.R.: Computation of squares in a string. In: Crochemore, M., Gusfield, D. (eds.) Proc. 5th Combinat. Patt. Matching, pp. 146–150. Springer, Heidelberg (1994)

    Google Scholar 

  16. Main, M., Lorentz, R.: An O(nlogn) algorithm for finding all repetitions in a string. J. Algorithms 5(3), 422–432 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  17. Main, M., Lorentz, R.: Linear time recognition of square free strings. In: Apostolico, A., Galil, Z. (eds.) Combinat. Algor. on Words, pp. 272–278. Springer, Heidelberg (1985)

    Google Scholar 

  18. Main, M.G.: Detecting leftmost maximal periodicities. Discrete Appl. Math. 25(1–2), 145–153 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  19. McCreight, E.M.: A space-economical suffix tree construction algorithm. J. Assoc. Comput. Mach. 23(2), 262–272 (1976)

    MATH  MathSciNet  Google Scholar 

  20. Schieber, B., Vishkin, U.: On finding lowest common ancestors: Simplification and parallelization. SIAM J. Comput. 17(6), 1253–1262 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  21. Slisenko, A.O.: Detection of periodicities and string-matching in real time. J. Math. Sci (N. Y.) 22(3), 1316–1387 (1983)

    Article  MATH  Google Scholar 

  22. Stoye, J., Gusfield, D.: Simple and flexible detection of contiguous repeats using a suffix tree preliminary version. In: Farach-Colton, M. (ed.) Proc. 9th Combinat. Patt. Matching, pp. 140–152. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  23. Thue, A.: Über unendliche Zeichenreihen. Norske Vid. Selsk. Skr. I. Mat.-Nat. Kl (7), 1–22 (1906)

    Google Scholar 

  24. Ukkonen, E.: Constructing suffix trees on-line in linear time. In: Leeuwen, J.V. (ed.) Proc. Infor. Proces. 92, IFIP Trans. A-12., Vol. 1. pp. 484–492. Elsevier, Amsterdam (1992)

    Google Scholar 

  25. Weiner, P.: Linear pattern matching algorithms. In: Proc. 14th IEEE Ann. Symp. on Switching and Automata Theory (SWAT), pp. 1–11 (1973)

    Google Scholar 

  26. Xu, Z.: http://www.csd.uwo.ca/~zhi_xu/demons/cpm2010xu.html (2010)

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Xu, Z. (2010). A Minimal Periods Algorithm with Applications. In: Amir, A., Parida, L. (eds) Combinatorial Pattern Matching. CPM 2010. Lecture Notes in Computer Science, vol 6129. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13509-5_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-13509-5_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-13508-8

  • Online ISBN: 978-3-642-13509-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics