English

Grammar-Compressed Indexes with Logarithmic Search Time

Data Structures and Algorithms 2020-04-03 v1

Abstract

Let a text T[1..n]T[1..n] be the only string generated by a context-free grammar with gg (terminal and nonterminal) symbols, and of size GG (measured as the sum of the lengths of the right-hand sides of the rules). Such a grammar, called a grammar-compressed representation of TT, can be encoded using essentially GlggG\lg g bits. We introduce the first grammar-compressed index that uses O(Glgn)O(G\lg n) bits and can find the occocc occurrences of patterns P[1..m]P[1..m] in time O((m2+occ)lgG)O((m^2+occ)\lg G). We implement the index and demonstrate its practicality in comparison with the state of the art, on highly repetitive text collections.

Keywords

Cite

@article{arxiv.2004.01032,
  title  = {Grammar-Compressed Indexes with Logarithmic Search Time},
  author = {Francisco Claude and Gonzalo Navarro and Alejandro Pacheco},
  journal= {arXiv preprint arXiv:2004.01032},
  year   = {2020}
}

Comments

arXiv admin note: substantial text overlap with arXiv:1110.4493

R2 v1 2026-06-23T14:36:51.338Z