English

Optimal trade-offs for pattern matching with $k$ mismatches

Data Structures and Algorithms 2017-04-06 v1

Abstract

Given a pattern of length mm and a text of length nn, the goal in kk-mismatch pattern matching is to compute, for every mm-substring of the text, the exact Hamming distance to the pattern or report that it exceeds kk. This can be solved in either O~(nk)\widetilde{O}(n \sqrt{k}) time as shown by Amir et al. [J. Algorithms 2004] or O~((m+k2)n/m)\widetilde{O}((m + k^2) \cdot n/m) time due to a result of Clifford et al. [SODA 2016]. We provide a smooth time trade-off between these two bounds by designing an algorithm working in time O~((m+km)n/m)\widetilde{O}( (m + k \sqrt{m}) \cdot n/m). We complement this with a matching conditional lower bound, showing that a significantly faster combinatorial algorithm is not possible, unless the combinatorial matrix multiplication conjecture fails.

Keywords

Cite

@article{arxiv.1704.01311,
  title  = {Optimal trade-offs for pattern matching with $k$ mismatches},
  author = {Paweł Gawrychowski and Przemysław Uznański},
  journal= {arXiv preprint arXiv:1704.01311},
  year   = {2017}
}
R2 v1 2026-06-22T19:08:08.811Z