English

Circular Pattern Matching with $k$ Mismatches

Data Structures and Algorithms 2020-01-14 v2

Abstract

The kk-mismatch problem consists in computing the Hamming distance between a pattern PP of length mm and every length-mm substring of a text TT of length nn, if this distance is no more than kk. In many real-world applications, any cyclic rotation of PP is a relevant pattern, and thus one is interested in computing the minimal distance of every length-mm substring of TT and any cyclic rotation of PP. This is the circular pattern matching with kk mismatches (kk-CPM) problem. A multitude of papers have been devoted to solving this problem but, to the best of our knowledge, only average-case upper bounds are known. In this paper, we present the first non-trivial worst-case upper bounds for the kk-CPM problem. Specifically, we show an O(nk)O(nk)-time algorithm and an O(n+nmk4)O(n+\frac{n}{m}\,k^4)-time algorithm. The latter algorithm applies in an extended way a technique that was very recently developed for the kk-mismatch problem [Bringmann et al., SODA 2019]. A preliminary version of this work appeared at FCT 2019. In this version we improve the time complexity of the main algorithm from O(n+nmk5)O(n+\frac{n}{m}\,k^5) to O(n+nmk4)O(n+\frac{n}{m}\,k^4).

Keywords

Cite

@article{arxiv.1907.01815,
  title  = {Circular Pattern Matching with $k$ Mismatches},
  author = {Panagiotis Charalampopoulos and Tomasz Kociumaka and Solon P. Pissis and Jakub Radoszewski and Wojciech Rytter and Juliusz Straszyński and Tomasz Waleń and Wiktor Zuba},
  journal= {arXiv preprint arXiv:1907.01815},
  year   = {2020}
}

Comments

Extended version of a paper from FCT 2019

R2 v1 2026-06-23T10:10:55.315Z