English

Dynamic Grammar-Compressed Self-Index in $\delta$-Optimal Space

Data Structures and Algorithms 2026-04-29 v2

Abstract

A compressed self-index stores a string in compressed form while supporting locate queries without decompression. For highly repetitive strings (arising in web crawls, versioned documents, and genomic collections), static self-indexes can match the δ\delta-optimal lower bound of Ω(δlog(nlogσ/(δlogn))logn)\Omega(\delta \log(n \log \sigma / (\delta \log n)) \log n) bits up to constant factors, where nn is the string length, σ\sigma is the alphabet size, and δ\delta is the substring complexity. Their dynamic counterparts, however, remain scarce: every existing dynamic self-index either fails to attain δ\delta-optimal space, pays at least Θ(logn)\Theta(\log n) time per reported occurrence during locate, or exposes the longest common prefix (LCP) of the text inside its update time. We present the dynamic RR-index, a dynamic grammar-compressed self-index built on the restricted recompression run-length straight-line program (RLSLP). To our knowledge, it is the first dynamic self-index to attain δ\delta-optimal space. The index occupies expected O(δlog(nlogσ/(δlogn))logn)O(\delta \log(n \log \sigma / (\delta \log n)) \log n) bits, answers locate queries in expected O(m+logmlog2n+occ(logn/loglogn))O(m + \log m \log^{2} n + \mathit{occ} (\log n / \log \log n)) time (where mm is the pattern length and occ\mathit{occ} is the number of occurrences), and supports insertions and deletions of a length-mm' substring in expected amortized O(mlog2n+log3n)O(m' \log^{2} n + \log^{3} n) time, with no dependence on the LCP. On eleven highly repetitive corpora, including a 3737 GB Wikipedia dump and a 5959 GB human-chromosome collection, the dynamic RR-index is up to 77×77\times faster than the dynamic r-index on updates and up to 11×11\times faster than other dynamic indexes on locate.

Keywords

Cite

@article{arxiv.2604.24080,
  title  = {Dynamic Grammar-Compressed Self-Index in $\delta$-Optimal Space},
  author = {Takaaki Nishimoto and Yasuo Tabei},
  journal= {arXiv preprint arXiv:2604.24080},
  year   = {2026}
}

Comments

Fix the title

R2 v1 2026-07-01T12:36:27.330Z