Near-Optimal-Time Quantum Algorithms for Approximate Pattern Matching
Abstract
Approximate Pattern Matching is among the most fundamental string-processing tasks. Given a text of length , a pattern of length , and a threshold , the task is to identify the fragments of that are at distance at most to . We consider the two most common distances: Hamming distance (the number of character substitutions) in Pattern Matching with Mismatches and edit distance (the minimum number of character insertions, deletions, and substitutions) in Pattern Matching with Edits. We revisit the complexity of these two problems in the quantum setting. Our recent work [STOC'24] shows that quantum queries are sufficient to solve (the decision version of) Pattern Matching with Edits. However, the quantum time complexity of the underlying solution does not provide any improvement over classical computation. On the other hand, the state-of-the-art algorithm for Pattern Matching with Mismatches [Jin and Nogler; SODA'23] achieves query complexity and time complexity , falling short of an unconditional lower bound of queries. In this work, we present quantum algorithms with a time complexity of for Pattern Matching with Mismatches and for Pattern Matching with Edits; both solutions use queries. The running times are near-optimal for and , respectively, and offer advantage over classical algorithms for and , respectively. Our solutions can also report the starting positions of approximate occurrences of in (represented as collections of arithmetic progressions); in this case, the unconditional lower bound and the complexities of our algorithms increase by a factor.
Cite
@article{arxiv.2410.06808,
title = {Near-Optimal-Time Quantum Algorithms for Approximate Pattern Matching},
author = {Tomasz Kociumaka and Jakob Nogler and Philip Wellnitz},
journal= {arXiv preprint arXiv:2410.06808},
year = {2024}
}
Comments
69 pages, 2 figures