Dynamic r-index: An Updatable Self-Index in LCP-bounded Time
Abstract
A self-index is a compressed data structure that supports locate queries -- reporting all positions where a given pattern occurs in a string while maintaining the string in compressed form. While many self-indexes have been proposed, developing dynamically updatable ones supporting string insertions and deletions remains a challenge. The r-index (Gagie et al., JACM'20) is a representative static self-index based on the run-length Burrows-Wheeler transform (RLBWT), designed for highly repetitive strings. We present the dynamic r-index, a dynamic extension of the r-index that achieves updates in LCP-bounded time. The dynamic r-index supports count queries in time and locate queries in time, using words of space, where is the length of a query with occurrences and is the number of runs in the RLBWT. Crucially, update operations are supported in time for a substring of length , where is the maximum LCP value; the average running time is , where is the average LCP value. This LCP-bounded complexity is particularly advantageous for highly repetitive strings where LCP values are typically small. We experimentally demonstrate the practical efficiency of the dynamic r-index on various highly repetitive datasets.
Cite
@article{arxiv.2504.19482,
title = {Dynamic r-index: An Updatable Self-Index in LCP-bounded Time},
author = {Takaaki Nishimoto and Yasuo Tabei},
journal= {arXiv preprint arXiv:2504.19482},
year = {2025}
}
Comments
I fixed the abstract so that it is now displayed correctly in Chrome