Efficiently computing runs on a trie
Efficiently computing runs on a trie
复制标题
高效计算在 trie 上运行
DOI:
10.1016/j.tcs.2021.07.011
复制
发表时间:
2021
影响因子:
1.1
通讯作者:
Masayuki Takeda
中科院分区:
文献类型:
--
作者:
Ryo Sugahara;Yuto Nakashima;Shunsuke Inenaga;Hideo Bannai;Masayuki Takeda
A maximal repetition, or run, in a string, is a maximal periodic substring whose smallest period is at most half the length of the substring. In this paper, we consider runs that correspond to a path on a trie, or in other words, on a rooted edge-labeled tree where each edge is labeled with a single symbol, and the endpoints of the path must be a descendant/ancestor of the other. For a trie with n edges, we show that the number of runs is less than n. We also show an asymptotic lower bound on the maximum density of runs in tries: lim n→∞ ρ T (n)/n> 0.9932348 where ρ T (n) is the maximum number of runs in a trie with n edges. Furthermore, we also show an O (n log log n) time and O (n) space algorithm for finding all runs.