English

Linear Time Runs over General Ordered Alphabets

Data Structures and Algorithms 2021-02-18 v1

Abstract

A run in a string is a maximal periodic substring. For example, the string bananatree\texttt{bananatree} contains the runs anana=(an)3/2\texttt{anana} = (\texttt{an})^{3/2} and ee=e2\texttt{ee} = \texttt{e}^2. There are less than nn runs in any length-nn string, and computing all runs for a string over a linearly-sortable alphabet takes O(n)\mathcal{O}(n) time (Bannai et al., SODA 2015). Kosolobov conjectured that there also exists a linear time runs algorithm for general ordered alphabets (Inf. Process. Lett. 2016). The conjecture was almost proven by Crochemore et al., who presented an O(nα(n))\mathcal{O}(n\alpha(n)) time algorithm (where α(n)\alpha(n) is the extremely slowly growing inverse Ackermann function). We show how to achieve O(n)\mathcal{O}(n) time by exploiting combinatorial properties of the Lyndon array, thus proving Kosolobov's conjecture.

Keywords

Cite

@article{arxiv.2102.08670,
  title  = {Linear Time Runs over General Ordered Alphabets},
  author = {Jonas Ellert and Johannes Fischer},
  journal= {arXiv preprint arXiv:2102.08670},
  year   = {2021}
}

Comments

This work has been submitted to ICALP 2021

R2 v1 2026-06-23T23:14:31.808Z