English

Grammar-Based Construction of Indexes for Binary Jumbled Pattern Matching

Data Structures and Algorithms 2012-11-16 v3

Abstract

We show how, given a straight-line program with gg rules for a binary string BB of length nn, in O(g2/3n4/3)O(g^{2 / 3} n^{4 / 3}) time we can build a linear-space index such that, given mm and cc, in O(1) time we can determine whether there is a substring of BB with length mm containing exactly cc copies of 1. If we use O(nlogn)O(n \log n) space for the index, then we can list all such substrings using O(m)O(m) time per substring.

Keywords

Cite

@article{arxiv.1210.8386,
  title  = {Grammar-Based Construction of Indexes for Binary Jumbled Pattern Matching},
  author = {Travis Gagie},
  journal= {arXiv preprint arXiv:1210.8386},
  year   = {2012}
}
R2 v1 2026-06-21T22:31:01.284Z