 # String Powers in Trees

In this paper we consider substrings of an unrooted edge‐labeled tree, which are defined as the composite labels of simple paths. We study how the number of distinct repetitive substrings depends on their exponent $\mathit{\alpha }$ . An $\mathit{\alpha }$ ‐power is defined as a string U with an (integral, not necessarily shortest) period $|U|/\mathit{\alpha }$ . For example, squares are 2‐powers and cubes are 3‐powers. We investigate the asymptotic growth of the maximal number ${{powers}}_{\mathit{\alpha }}\left(n\right)$ of distinct $\mathit{\alpha }$ ‐powers occurring as substrings of a tree with n nodes. The maximum number of such powers behaves much unlike in strings. In a previous work (CPM 2012. LNCS, vol 7354. Springer, Berlin, pp 27–40, 2012. It was proved that the number of different squares in a tree is ${{powers}}_{2}\left(n\right)=\mathit{\Theta }\left({n}^{4/3}\right)$ . We extend this result and analyze powers of arbitrary rational exponent $\mathit{\alpha }\ge 1$ . We identify two phase‐transition thresholds:
• ${{powers}}_{\mathit{\alpha }}\left(n\right)\phantom{\rule{0.277778em}{0ex}}=\phantom{\rule{0.277778em}{0ex}}\mathit{\Theta }\left({n}^{2}\right)$ for $1\le \mathit{\alpha }<2$ ;
• ${{powers}}_{\mathit{\alpha }}\left(n\right)\phantom{\rule{0.277778em}{0ex}}=\phantom{\rule{0.277778em}{0ex}}\mathit{\Theta }\left({n}^{4/3}\right)$ for $2\le \mathit{\alpha }<3$ ;
• ${{powers}}_{\mathit{\alpha }}\left(n\right)\phantom{\rule{0.277778em}{0ex}}=\phantom{\rule{0.277778em}{0ex}}\mathit{\Theta }\left(n\right)$ for $\mathit{\alpha }\ge 3$ .
• This is a full version of a paper presented at CPM 2015. LNCS, vol 9133. Springer, Berlin, pp 284–294, 2015. Compared to the earlier version, we improve our main technical contribution, i.e., the upper bound on the number of cubes in a tree, from $\mathcal{O}\left(nlogn\right)$ to $\mathcal{O}\left(n\right)$ . This lets us obtain a tight asymptotic characterization of the $‐{powers}$ function.