English

Space Efficient Construction of Lyndon Arrays in Linear Time

Data Structures and Algorithms 2019-12-11 v2

Abstract

We present the first linear time algorithm to construct the 2n2n-bit version of the Lyndon array for a string of length nn using only o(n)o(n) bits of working space. A simpler variant of this algorithm computes the plain (nlgnn\lg n-bit) version of the Lyndon array using only O(1)\mathcal{O}(1) words of additional working space. All previous algorithms are either not linear, or use at least nlgnn\lg n bits of additional working space. Also in practice, our new algorithms outperform the previous best ones by an order of magnitude, both in terms of time and space.

Keywords

Cite

@article{arxiv.1911.03542,
  title  = {Space Efficient Construction of Lyndon Arrays in Linear Time},
  author = {Philip Bille and Jonas Ellert and Johannes Fischer and Inge Li Gørtz and Florian Kurpicz and Ian Munro and Eva Rotenberg},
  journal= {arXiv preprint arXiv:1911.03542},
  year   = {2019}
}
R2 v1 2026-06-23T12:09:54.860Z