English

Dynamic r-index: An Updatable Self-Index in LCP-bounded Time

Data Structures and Algorithms 2025-10-30 v4

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 O(mlogr/loglogr)O(m \log r / \log \log r) time and locate queries in O(mlogr/loglogr+occlogr)O(m \log r / \log \log r + \mathsf{occ} \log r) time, using O(r)O(r) words of space, where mm is the length of a query with occ\mathsf{occ} occurrences and rr is the number of runs in the RLBWT. Crucially, update operations are supported in O((m+Lmax)logn)O((m + L_{\mathsf{max}}) \log n) time for a substring of length mm, where LmaxL_{\mathsf{max}} is the maximum LCP value; the average running time is O((m+Lavg)logn)O((m + L_{\mathsf{avg}}) \log n), where LavgL_{\mathsf{avg}} 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.

Keywords

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