English

Faster run-length compressed suffix arrays

Data Structures and Algorithms 2025-04-22 v7

Abstract

We first review how we can store a run-length compressed suffix array (RLCSA) for a text TT of length nn over an alphabet of size σ\sigma whose Burrows-Wheeler Transform (BWT) consists of rr runs in O(rlog(n/r)+rlogσ+σ)O \left( \rule{0ex}{2ex} r \log (n / r) + r \log \sigma + \sigma \right) bits such that later, given character aa and the suffix array interval for PP, we can find the suffix-array (SA) interval for aPa P in O(logra+loglogn)O (\log r_a + \log \log n) time, where rar_a is the number of runs of copies of aa in the BWT. We then show how to modify the RLCSA such that we find the SA interval for aPa P in only O(logra)O (\log r_a) time, without increasing its asymptotic space bound. Our key idea is applying a result by Nishimoto and Tabei (ICALP 2021) and then replacing rank queries on sparse bitvectors by a constant number of select queries. We also review two-level indexing and discuss how our faster RLCSA may be useful in improving it. Finally, we briefly discuss how two-level indexing may speed up a recent heuristic for finding maximal exact matches of a pattern with respect to an indexed text.

Keywords

Cite

@article{arxiv.2408.04537,
  title  = {Faster run-length compressed suffix arrays},
  author = {Nathaniel K. Brown and Travis Gagie and Giovanni Manzini and Gonzalo Navarro and Marinella Sciortino},
  journal= {arXiv preprint arXiv:2408.04537},
  year   = {2025}
}
R2 v1 2026-06-28T18:07:50.187Z