,
Yasuo Tabei
Creative Commons Attribution 4.0 International license
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 δ-optimal lower bound of Ω(δ log(n log σ / (δ log n)) log n) bits up to constant factors, where n is the string length, σ is the alphabet size, and δ is the substring complexity. Their dynamic counterparts, however, remain scarce: every existing dynamic self-index either fails to attain δ-optimal space, pays Ω(log n) time per reported occurrence during locate, or has an update time that grows with the maximum value in the longest common prefix (LCP) array of the text. 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 δ-optimal space. The index occupies expected 𝒪(δ log(n log σ / (δ log n)) log n) bits, answers locate queries in expected 𝒪(m + log m log² n + occ (log n / log log n)) time - where m is the pattern length and occ is the number of occurrences - and supports insertion of a length-m' string and deletion of a length-m' substring in expected amortized 𝒪(m' log² n + log³ n) time, with no dependence on the maximum LCP value. On eleven highly repetitive corpora, including a 37 GB Wikipedia dump and a 59 GB human-chromosome collection, the dynamic RR-index is up to 77× faster than the dynamic r-index on updates and up to 11× faster than other dynamic indexes on locate.
@InProceedings{nishimoto_et_al:LIPIcs.ESA.2026.6,
author = {Nishimoto, Takaaki and Tabei, Yasuo},
title = {{Dynamic Grammar-Compressed Self-Index in \delta-Optimal Space}},
booktitle = {34th Annual European Symposium on Algorithms (ESA 2026)},
pages = {6:1--6:24},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-445-1},
ISSN = {1868-8969},
year = {2026},
volume = {388},
editor = {Bille, Philip and Pettie, Seth and Storandt, Sabine},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2026.6},
URN = {urn:nbn:de:0030-drops-271422},
doi = {10.4230/LIPIcs.ESA.2026.6},
annote = {Keywords: Compressed string indexes, grammar-compression, dynamic data structures}
}
archived version
archived version