Linear Time Runs over General Ordered Alphabets

Jonas Ellert, Johannes Fischer
2/17/2021
cs.DS

Official code: jonas-ellert/linear-time-runs (4 stars, C++, MIT, last commit 2021-06-23).

Abstract

A run in a string is a maximal periodic substring. For example, the string $\texttt{bananatree}$ contains the runs $\texttt{anana} = (\texttt{an})^{3/2}$ and $\texttt{ee} = \texttt{e}^2$.

Show full abstract

There are less than $n$ runs in any length-$n$ string, and computing all runs for a string over a linearly-sortable alphabet takes $\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 $\mathcal{O}(nα(n))$ time algorithm (where $α(n)$ is the extremely slowly growing inverse Ackermann function). We show how to achieve $\mathcal{O}(n)$ time by exploiting combinatorial properties of the Lyndon array, thus proving Kosolobov's conjecture.

View on arXivView PDF

Code Implementations(1)

MIT
41C++Aug 28, 20205 years agoMIT

Similar Papers

Cite this paper

@article{ellert2021linear,
  title  = {Linear Time Runs over General Ordered Alphabets},
  author = {Jonas Ellert and Johannes Fischer},
  year   = {2021},
  eprint = {2102.08670},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.08670}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.08670.svg)](https://codeofpaper.com/paper/2102.08670)

Discussion