Efficiently computing runs on a trie

Ryo Sugahara, Yuto Nakashima, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)


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: limn→∞⁡ρ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(nlog⁡log⁡n) time and O(n) space algorithm for finding all runs.

Original languageEnglish
Pages (from-to)143-151
Number of pages9
JournalTheoretical Computer Science
Publication statusPublished - Oct 2 2021

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • General Computer Science


Dive into the research topics of 'Efficiently computing runs on a trie'. Together they form a unique fingerprint.

Cite this