Approximate Circular Pattern Matching
Abstract
We consider approximate circular pattern matching (CPM, in short) under the Hamming and edit distance, in which we are given a length- text , a length- pattern , and a threshold , and we are to report all starting positions of fragments of (called occurrences) that are at distance at most from some cyclic rotation of . In the decision version of the problem, we are to check if any such occurrence exists. All previous results for approximate CPM were either average-case upper bounds or heuristics, except for the work of Charalampopoulos et al. [CKP, JCSS'21], who considered only the Hamming distance. For the reporting version of the approximate CPM problem, under the Hamming distance we improve upon the main algorithm of [CKP, JCSS'21] from to time; for the edit distance, we give an -time algorithm. We also consider the decision version of the approximate CPM problem. Under the Hamming distance, we obtain an -time algorithm, which nearly matches the algorithm by Chan et al. [CGKKP, STOC'20] for the standard counterpart of the problem. Under the edit distance, the running time of our algorithm nearly matches the running time of the Landau-Vishkin algorithm [LV, J. Algorithms'89]. As a stepping stone, we propose an -time algorithm for the Longest Prefix -Approximate Match problem, proposed by Landau et al. [LMS, SICOMP'98], for all . We give a conditional lower bound that suggests a polynomial separation between approximate CPM under the Hamming distance over the binary alphabet and its non-circular counterpart. We also show that a strongly subquadratic-time algorithm for the decision version of approximate CPM under edit distance would refute SETH.
Cite
@article{arxiv.2208.08915,
title = {Approximate Circular Pattern Matching},
author = {Panagiotis Charalampopoulos and Tomasz Kociumaka and Jakub Radoszewski and Solon P. Pissis and Wojciech Rytter and Tomasz Waleń and Wiktor Zuba},
journal= {arXiv preprint arXiv:2208.08915},
year = {2025}
}
Comments
A preliminary version of this article was presented at ESA 2022. In this version, we have improved the exposition and improved some complexities by polylogarithmic factors. Abstract abridged to meet arXiv requirements