English

Counting on General Run-Length Grammars

Data Structures and Algorithms 2025-01-30 v4

Abstract

We introduce a data structure for counting pattern occurrences in texts compressed with any run-length context-free grammar. Our structure uses space proportional to the grammar size and counts the occurrences of a pattern of length mm in a text of length nn in time O(mlog2+ϵn)O(m\log^{2+\epsilon} n), for any constant ϵ>0\epsilon > 0 chosen at indexing time. This is the first solution to an open problem posed by Christiansen et al.~[ACM TALG 2020] and enhances our abilities for computation over compressed data; we give an example application.

Keywords

Cite

@article{arxiv.2406.00221,
  title  = {Counting on General Run-Length Grammars},
  author = {Gonzalo Navarro and Alejandro Pacheco},
  journal= {arXiv preprint arXiv:2406.00221},
  year   = {2025}
}
R2 v1 2026-06-28T16:49:13.898Z