Grammar-Compressed Indexes with Logarithmic Search Time

Francisco Claude, Gonzalo Navarro, Alejandro Pacheco
4/1/2020
cs.DS

Official code: apachecom/grammar_improved_index (7 stars, C++, last commit 2021-12-30).

Abstract

Let a text $T[1..n]$ be the only string generated by a context-free grammar with $g$ (terminal and nonterminal) symbols, and of size $G$ (measured as the sum of the lengths of the right-hand sides of the rules). Such a grammar, called a grammar-compressed representation of $T$, can be encoded using essentially $G\lg g$ bits.

Show full abstract

We introduce the first grammar-compressed index that uses $O(G\lg n)$ bits and can find the $occ$ occurrences of patterns $P[1..m]$ in time $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.

View on arXivView PDF

Code Implementations(1)

Grammar Index

72C++, CMakeMar 25, 20204 years ago

Similar Papers

Cite this paper

@article{claude2020grammarcompressed,
  title  = {Grammar-Compressed Indexes with Logarithmic Search Time},
  author = {Francisco Claude and Gonzalo Navarro and Alejandro Pacheco},
  year   = {2020},
  eprint = {2004.01032},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2004.01032}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2004.01032.svg)](https://codeofpaper.com/paper/2004.01032)

Discussion