CPM 2015: Combinatorial Pattern Matching pp 284-294

# String Powers in Trees

• Tomasz Kociumaka
• 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).

## Keywords

Rooted Tree Directed Tree Simple Path Asymptotic Bound Label Tree
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.

## References

1. 1.
Amir, A., Lewenstein, M., Lewenstein, N.: Pattern matching in hypertext. J. Algorithms 35(1), 82–99 (2000)
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)
3. 3.
Crochemore, M., Hancart, C., Lecroq, T.: Algorithms on Strings. Cambridge University Press, Cambridge (2007)
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)
5. 5.
Fraenkel, A.S., Simpson, J.: How many squares can a string contain? J. Comb. Theory Ser. A 82(1), 112–120 (1998)
6. 6.
Grytczuk, J.: Thue type problems for graphs, points, and numbers. Discrete Math. 308(19), 4419–4429 (2008)
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)
8. 8.
Ilie, L.: A note on the number of squares in a word. Theor. Comput. Sci. 380(3), 373–376 (2007)
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)
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)
14. 14.
Thue, A.: Über unendliche Zeichenreihen. Norske Videnskabers Selskabs Skrifter Mat.-Nat. Kl. 7, 1–22 (1906)Google Scholar

© Springer International Publishing Switzerland 2015

## Authors and Affiliations

• Tomasz Kociumaka
• 1