Approximate Circular Pattern Matching under Edit Distance
Abstract
In the -Edit Circular Pattern Matching (-Edit CPM) problem, we are given a length- text , a length- pattern , and a positive integer threshold , and we are to report all starting positions of the substrings of that are at edit distance at most from some cyclic rotation of . In the decision version of the problem, we are to check if any such substring exists. Very recently, Charalampopoulos et al. [ESA 2022] presented -time and -time solutions for the reporting and decision versions of -Edit CPM, respectively. Here, we show that the reporting and decision versions of -Edit CPM can be solved in time and time, respectively, thus obtaining the first algorithms with a complexity of the type for this problem. Notably, our algorithms run in time when and are superior to the previous respective solutions when . We provide a meta-algorithm that yields efficient algorithms in several other interesting settings, such as when the strings are given in a compressed form (as straight-line programs), when the strings are dynamic, or when we have a quantum computer. We obtain our solutions by exploiting the structure of approximate circular occurrences of in , when is relatively short w.r.t. . Roughly speaking, either the starting positions of approximate occurrences of rotations of form intervals that can be computed efficiently, or some rotation of is almost periodic (is at a small edit distance from a string with small period). Dealing with the almost periodic case is the most technically demanding part of this work; we tackle it using properties of locked fragments (originating from [Cole and Hariharan, SICOMP 2002]).
Cite
@article{arxiv.2402.14550,
title = {Approximate Circular Pattern Matching under Edit Distance},
author = {Panagiotis Charalampopoulos and Solon P. Pissis and Jakub Radoszewski and Wojciech Rytter and Tomasz Waleń and Wiktor Zuba},
journal= {arXiv preprint arXiv:2402.14550},
year = {2024}
}
Comments
Full version of a paper accepted to STACS 2024