eng
Schloss Dagstuhl – Leibniz-Zentrum für Informatik
Leibniz International Proceedings in Informatics
1868-8969
2020-06-29
14:1
14:18
10.4230/LIPIcs.ICALP.2020.14
article
Space Efficient Construction of Lyndon Arrays in Linear Time
Bille, Philip
1
https://orcid.org/0000-0002-1120-5154
Ellert, Jonas
2
https://orcid.org/0000-0003-3305-6185
Fischer, Johannes
2
Gørtz, Inge Li
1
https://orcid.org/0000-0002-8322-4952
Kurpicz, Florian
2
https://orcid.org/0000-0002-2379-9455
Munro, J. Ian
3
Rotenberg, Eva
1
https://orcid.org/0000-0001-5853-7909
DTU Compute, Technical University of Denmark, Lyngby, Denmark
Department of Computer Science, Technical University of Dortmund, Germany
Cheriton School of Computer Science, University of Waterloo, Canada
Given a string S of length n, its Lyndon array identifies for each suffix S[i..n] the next lexicographically smaller suffix S[j..n], i.e. the minimal index j > i with S[i..n] ≻ S[j..n]. Apart from its plain (n log₂ n)-bit array representation, the Lyndon array can also be encoded as a succinct parentheses sequence that requires only 2n bits of space. While linear time construction algorithms for both representations exist, it has previously been unknown if the same time bound can be achieved with less than Ω(n lg n) bits of additional working space. We show that, in fact, o(n) additional bits are sufficient to compute the succinct 2n-bit version of the Lyndon array in linear time. For the plain (n log₂ n)-bit version, we only need 𝒪(1) additional words to achieve linear time. Our space efficient construction algorithm makes the Lyndon array more accessible as a fundamental data structure in applications like full-text indexing.
https://drops.dagstuhl.de/storage/00lipics/lipics-vol168-icalp2020/LIPIcs.ICALP.2020.14/LIPIcs.ICALP.2020.14.pdf
String algorithms
string suffixes
succinct data structures
Lyndon word
Lyndon array
nearest smaller values
nearest smaller suffixes