English

A Fast and Small Subsampled R-index

Data Structures and Algorithms 2021-03-30 v1

Abstract

The rr-index (Gagie et al., JACM 2020) represented a breakthrough in compressed indexing of repetitive text collections, outperforming its alternatives by orders of magnitude. Its space usage, O(r)\mathcal{O}(r) where rr is the number of runs in the Burrows-Wheeler Transform of the text, is however larger than Lempel-Ziv and grammar-based indexes, and makes it uninteresting in various real-life scenarios of milder repetitiveness. In this paper we introduce the srsr-index, a variant that limits the space to O(min(r,n/s))\mathcal{O}(\min(r,n/s)) for a text of length nn and a given parameter ss, at the expense of multiplying by ss the time per occurrence reported. The srsr-index is obtained by carefully subsampling the text positions indexed by the rr-index, in a way that we prove is still able to support pattern matching with guaranteed performance. Our experiments demonstrate that the srsr-index sharply outperforms virtually every other compressed index on repetitive texts, both in time and space, even matching the performance of the rr-index while using 1.5--3.0 times less space. Only some Lempel-Ziv-based indexes achieve better compression than the srsr-index, using about half the space, but they are an order of magnitude slower.

Keywords

Cite

@article{arxiv.2103.15329,
  title  = {A Fast and Small Subsampled R-index},
  author = {Dustin Cobas and Travis Gagie and Gonzalo Navarro},
  journal= {arXiv preprint arXiv:2103.15329},
  year   = {2021}
}
R2 v1 2026-06-24T00:38:05.487Z