String Powers in Trees

  • Tomasz Kociumaka
  • Jakub Radoszewski
  • Wojciech Rytter
  • Tomasz Waleń
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9133)

Abstract

We investigate the asymptotic growth of the maximal number \(\mathsf{powers }_{\alpha }(n)\) of different \(\alpha \)-powers (strings \(w\) with a period \(|w|/\alpha \)) in an edge-labeled unrooted tree of size \(n\). The number of different powers in trees behaves much unlike in strings. In a previous work (CPM, 2012) it was proved that the number of different squares in a tree is \(\mathsf{powers }_2(n) = \varTheta (n^{4/3})\). We extend this result and analyze other powers. We show that there are phase-transition thresholds:
  1. 1.

    \(\mathsf{powers }_{\alpha }(n)\;=\;\varTheta (n^2)\) for \(\alpha <2\);

     
  2. 2.

    \(\mathsf{powers }_{\alpha }(n)\;=\; \varTheta (n^{4/3})\) for \(2\le \alpha <3\);

     
  3. 3.

    \(\mathsf{powers }_{\alpha }(n)\;=\; {\mathcal {O}}(n \log n)\) for \(3\le \alpha <4\);

     
  4. 4.

    \(\mathsf{powers }_{\alpha }(n)\;=\; \varTheta (n)\) for \(4\le \alpha \).

     

The difficult case is the third point, which follows from the fact that the number of different cubes in a rooted tree is linear (in this case, only cubes passing through the root are counted).

References

  1. 1.
    Amir, A., Lewenstein, M., Lewenstein, N.: Pattern matching in hypertext. J. Algorithms 35(1), 82–99 (2000)MATHMathSciNetCrossRefGoogle Scholar
  2. 2.
    Brešar, B., Grytczuk, J., Klavžar, S., Niwczyk, S., Peterin, I.: Nonrepetitive colorings of trees. Discrete Math. 307(2), 163–172 (2007)MATHMathSciNetCrossRefGoogle Scholar
  3. 3.
    Crochemore, M., Hancart, C., Lecroq, T.: Algorithms on Strings. Cambridge University Press, Cambridge (2007)MATHCrossRefGoogle Scholar
  4. 4.
    Crochemore, M., Iliopoulos, C.S., Kociumaka, T., Kubica, M., Radoszewski, J., Rytter, W., Tyczyński, W., Waleń, T.: The maximum number of squares in a tree. In: Kärkkäinen, J., Stoye, J. (eds.) CPM 2012. LNCS, vol. 7354, pp. 27–40. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  5. 5.
    Fraenkel, A.S., Simpson, J.: How many squares can a string contain? J. Comb. Theory Ser. A 82(1), 112–120 (1998)MATHMathSciNetCrossRefGoogle Scholar
  6. 6.
    Grytczuk, J.: Thue type problems for graphs, points, and numbers. Discrete Math. 308(19), 4419–4429 (2008)MATHMathSciNetCrossRefGoogle Scholar
  7. 7.
    Ilie, L.: A simple proof that a word of length \(n\) has at most \(2n\) distinct squares. J. Comb. Theory Ser. A 112(1), 163–164 (2005)MATHMathSciNetCrossRefGoogle Scholar
  8. 8.
    Ilie, L.: A note on the number of squares in a word. Theor. Comput. Sci. 380(3), 373–376 (2007)MATHMathSciNetCrossRefGoogle Scholar
  9. 9.
    Kociumaka, T., Pachocki, J., Radoszewski, J., Rytter, W., Waleń, T.: Efficient counting of square substrings in a tree. Theor. Comput. Sci. 544, 60–73 (2014)MATHCrossRefGoogle Scholar
  10. 10.
    Kociumaka, T., Radoszewski, J., Rytter, W., Waleń, T.: Maximum number of distinct and nonequivalent nonstandard squares in a word. In: Shur, A.M., Volkov, M.V. (eds.) DLT 2014. LNCS, vol. 8633, pp. 215–226. Springer, Heidelberg (2014) Google Scholar
  11. 11.
    Kociumaka, T., Radoszewski, J., Rytter, W., Waleń, T.: Internal pattern matching queries in a text and applications. In: Indyk, P. (ed.) 26th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, pp. 532–551. SIAM (2015)Google Scholar
  12. 12.
    Kubica, M., Radoszewski, J., Rytter, W., Waleń, T.: On the maximum number of cubic subwords in a word. Eur. J. Comb. 34(1), 27–37 (2013)Google Scholar
  13. 13.
    Lothaire, M.: Combinatorics on Words. Cambridge Mathematical Library, second edn. Cambridge University Press, New York (1997) MATHCrossRefGoogle Scholar
  14. 14.
    Thue, A.: Über unendliche Zeichenreihen. Norske Videnskabers Selskabs Skrifter Mat.-Nat. Kl. 7, 1–22 (1906)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Tomasz Kociumaka
    • 1
  • Jakub Radoszewski
    • 1
  • Wojciech Rytter
    • 1
  • Tomasz Waleń
    • 1
  1. 1.Faculty of Mathematics, Informatics and MechanicsUniversity of WarsawWarsawPoland

Personalised recommendations