English

Binary Jumbled Pattern Matching via All-Pairs Shortest Paths

Data Structures and Algorithms 2014-07-01 v4

Abstract

In binary jumbled pattern matching we wish to preprocess a binary string SS in order to answer queries (i,j)(i,j) which ask for a substring of SS that is of size ii and has exactly jj 1-bits. The problem naturally generalizes to node-labeled trees and graphs by replacing "substring" with "connected subgraph". In this paper, we give an n2/2Ω(logn/loglogn)1/2{n^2}/{2^{\Omega(\log n/\log \log n)^{1/2}}} time solution for both strings and trees. This odd-looking time complexity improves the state of the art O(n2/log2n)O(n^2/\log^2 n) solutions by more than any poly-logarithmic factor. It originates from the recent seminal algorithm of Williams for min-plus matrix multiplication. We obtain the result by giving a black box reduction from trees to strings. This is then combined with a reduction from strings to min-plus matrix multiplications.

Keywords

Cite

@article{arxiv.1401.2065,
  title  = {Binary Jumbled Pattern Matching via All-Pairs Shortest Paths},
  author = {Danny Hermelin and Gad M. Landau and Yuri Rabinovich and Oren Weimann},
  journal= {arXiv preprint arXiv:1401.2065},
  year   = {2014}
}
R2 v1 2026-06-22T02:42:15.361Z