Binary Jumbled Pattern Matching on Trees and Tree-Like Structures

Travis Gagie, Danny Hermelin, Gad M. Landau, Oren Weimann

Research output: Contribution to journalArticlepeer-review

Abstract

Binary jumbled pattern matching asks to preprocess a binary string $$S$$S in order to answer queries $$(i,j)$$(i,j) which ask for a substring of $$S$$S that is of length $$i$$i and has exactly $$j$$j 1-bits. This problem naturally generalizes to vertex-labeled trees and graphs by replacing “substring” with “connected subgraph”. In this paper, we give an $$O(n^2 / \log ^2 n)$$O(n2/log2n)-time solution for trees, matching the currently best bound for (the simpler problem of) strings. We also give an $${O}({g^{2 / 3} n^{4 / 3}/(\log n)^{4/3}})$$O(g2/3n4/3/(logn)4/3)-time solution for strings that are compressed by a context-free grammar of size $$g$$g in Chomsky normal form. This solution improves the known bounds when the string is compressible under many popular compression schemes. Finally, we prove that on graphs the problem is fixed-parameter tractable with respect to the treewidth $$w$$w of the graph, even for a constant number of different vertex-labels, thus improving the previous best $$n^{O(w)}$$nO(w) algorithm.

Original languageEnglish
Pages (from-to)571-588
Number of pages18
JournalAlgorithmica
Volume73
Issue number3
DOIs
StatePublished - 1 Nov 2015

Bibliographical note

Publisher Copyright:
© 2014, Springer Science+Business Media New York.

Keywords

  • Grammar compression
  • Graph motifs
  • Pattern matching
  • Permutation pattern matching
  • Tree pattern matching

ASJC Scopus subject areas

  • General Computer Science
  • Computer Science Applications
  • Applied Mathematics

Fingerprint

Dive into the research topics of 'Binary Jumbled Pattern Matching on Trees and Tree-Like Structures'. Together they form a unique fingerprint.

Cite this