vix.ing · top · new · best · stats

The “Runs” Theorem

2014/06/30 by Hideo Bannai, I Tomohiro, Tomohiro I +4 · 104 citations
Computer Science · Mathematics · #Algorithm #Algorithms and Data Compression #Characterization (materials science) #Combinatorics #Conjecture #Discrete mathematics #Factorization #Mathematics #Network Packet Processing and Optimization #Simple (philosophy) #String (physics) #Time complexity #Upper and lower bounds #cs.DM #cs.DS #semigroups and automata theory

paper · pdf · doi:10.1137/15m1011032

published in SIAM Journal on Computing 46(5), 1501-1514 (Society for Industrial and Applied Mathematics) · simple proof with some more bounds

arxiv created 2015/06/03 · openalex publication_date 2017/01/01 · arxiv updated 2018/07/03 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/05

Abstract

We give a new characterization of maximal repetitions (or runs) in strings based on Lyndon words. The characterization leads to a proof of what was known as the “runs” conjecture [R. M. Kolpakov and G. Kucherov, Proceedings of the IEEE Symposium on Foundations of Computer Science (FOCS), IEEE Computer Society, Los Alamitos, CA, 1999, pp. 596--604]), which states that the maximum number of runs ρ(n) in a string of length n is less than n. The proof is remarkably simple, considering the numerous endeavors to tackle this problem in the last 15 years, and significantly improves our understanding of how runs can occur in strings. In addition, we obtain an upper bound of 3n for the maximum sum of exponents σ(n) of runs in a string of length n, improving on the best known bound of 4.1n by Crochemore et al. [J. Discrete Algorithms, 14 (2012), pp. 29--36], as well as other improved bounds on related problems. The characterization also gives rise to a new, conceptually simple linear-time algorithm for computing all the runs in a string. A notable characteristic of our algorithm is that, unlike all existing linear-time algorithms, it does not utilize the Lempel--Ziv factorization of the string. We also establish a relationship between runs and nodes of the Lyndon tree, which gives a simple optimal solution to the 2-period query problem that was recently solved by Kociumaka et al. [Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, (SODA) 2015, San Diego, CA, SIAM, Philadelphia, 2015, pp. 532--551].

Cited by

Related