Pattern Matching with Edits in Time
Abstract
Given a pattern of length , a text of length , and a threshold , the Pattern Matching with Edits problem asks whether contains a substring that can be transformed into using at most character insertions, deletions, and substitutions. The classic - and -time algorithms of Sellers [J. Algorithms'80] and Landau and Vishkin [STOC'86, J. Algorithms'89] are near-optimal for under the Orthogonal Vectors Hypothesis. For small , Cole and Hariharan [SODA'98, SICOMP'02] achieved time, and Charalampopoulos, Kociumaka, and Wellnitz (CKW) [FOCS'22] improved this to , essentially halfway to the bound conjectured by Cole and Hariharan. This work confirms the conjecture up to a polylogarithmic factor with an -time algorithm. Working in the PILLAR model [CKW; FOCS'20], which accesses strings only through a few basic operations, it extends to grammar-compressed, dynamic, quantum, and small-space read-only settings. It also closes, up to the factor, the longstanding gap to certain aperiodic patterns, for which Cole and Hariharan achieved time. The alternative approach of CKW [FOCS'20] leaves one bottleneck, which the general case reduces to: and are close to periodic strings with a common period. This case amounts to many min-plus products of distance matrices, each consisting of long runs of one fixed matrix separated by other matrices. We collapse every long run into a single matrix and show that this preserves the distances that determine the occurrences unless the periodicity-breaking parts of and interact strongly. Our main structural result, a planar variation theorem, confines the exact computations needed in the remaining cases to narrow regions of the alignment graph.
Create a lesson
Related papers
Quantum Algorithm for Parameterized Aperiodic Pattern Matching
Shared title terminologycs.DSRahul Shah, Lalita Sthapit
Cluster Editing in Subexponential Fixed-Parameter Time
Shared title terminologycs.DSAlexander Firbas, Manuel Sorge
Graph Minor Decomposition in Almost-Linear Time
Shared title terminologycs.DSMohammadTaghi Hajiaghayi, Mahdi JafariRaviz
Weighted Steiner Tree in Subexponential Time
Shared title terminologycs.DSMohammadTaghi Hajiaghayi, Danny Mittal
A Simple PTAS for Square-Free 2-Matching
Shared title terminologycs.DSTakashi Noguchi, Tatsuya Terao
Optimal Deterministic Matching of Reusable Resources
Shared title terminologycs.DSPratik Chowdhury