English

New algorithms for binary jumbled pattern matching

Data Structures and Algorithms 2013-05-09 v2

Abstract

Given a pattern PP and a text TT, both strings over a binary alphabet, the binary jumbled string matching problem consists in telling whether any permutation of PP occurs in TT. The indexed version of this problem, i.e., preprocessing a string to efficiently answer such permutation queries, is hard and has been studied in the last few years. Currently the best bounds for this problem are O(n2/log2n)O(n^2/\log^2 n) (with O(n) space and O(1) query time) and O(r2logr)O(r^2\log r) (with O(|L|) space and O(logL)O(\log|L|) query time), where rr is the length of the run-length encoding of TT and L=O(n)|L| = O(n) is the size of the index. In this paper we present new results for this problem. Our first result is an alternative construction of the index by Badkobeh et al. that obtains a trade-off between the space and the time complexity. It has O(r2logk+n/k)O(r^2\log k + n/k) complexity to build the index, O(logk)O(\log k) query time, and uses O(n/k+L)O(n/k + |L|) space, where kk is a parameter. The second result is an O(n2log2w/w)O(n^2 \log^2 w / w) algorithm (with O(n) space and O(1) query time), based on word-level parallelism where ww is the word size in bits.

Keywords

Cite

@article{arxiv.1210.6176,
  title  = {New algorithms for binary jumbled pattern matching},
  author = {Emanuele Giaquinta and Szymon Grabowski},
  journal= {arXiv preprint arXiv:1210.6176},
  year   = {2013}
}
R2 v1 2026-06-21T22:26:21.535Z