Papers
Topics
Authors
Recent
Search
2000 character limit reached

Approximate Circular Pattern Matching under Edit Distance

Published 22 Feb 2024 in cs.DS | (2402.14550v1)

Abstract: In the kk-Edit Circular Pattern Matching (kk-Edit CPM) problem, we are given a length-nn text TT, a length-mm pattern PP, and a positive integer threshold kk, and we are to report all starting positions of the substrings of TT that are at edit distance at most kk from some cyclic rotation of PP. In the decision version of the problem, we are to check if any such substring exists. Very recently, Charalampopoulos et al. [ESA 2022] presented O(nk<sup>2)O(nk<sup>2)-time and O(nklog<sup>3</sup>k)O(nk \log<sup>3</sup> k)-time solutions for the reporting and decision versions of kk-Edit CPM, respectively. Here, we show that the reporting and decision versions of kk-Edit CPM can be solved in O(n+(n/m)k<sup>6)O(n+(n/m) k<sup>6) time and O(n+(n/m)k<sup>5</sup>log<sup>3</sup>k)O(n+(n/m) k<sup>5</sup> \log<sup>3</sup> k) time, respectively, thus obtaining the first algorithms with a complexity of the type O(n+(n/m)poly(k))O(n+(n/m) \mathrm{poly}(k)) for this problem. Notably, our algorithms run in O(n)O(n) time when m=Ω(k<sup>6)m=\Omega(k<sup>6) and are superior to the previous respective solutions when m=ω(k<sup>4)m=\omega(k<sup>4). 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 PP in TT, when TT is relatively short w.r.t. PP. Roughly speaking, either the starting positions of approximate occurrences of rotations of PP form O(k<sup>4)O(k<sup>4) intervals that can be computed efficiently, or some rotation of PP 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]).

Citations (3)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.