Lune

SODA2025้กถไผš

Near-Optimal-Time Quantum Algorithms for Approximate Pattern Matching

Tomasz Kociumaka, Jakob Nogler, Philip Wellnitz

2025ๅนดไปฝ
1่ขซๅผ•ๆฌกๆ•ฐ
1้กถไผšๅผ•็”จ

ๆ‘˜่ฆ

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 mismatches or 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 ร”( ๐‘›/๐‘š โ€ข โˆš ๐‘š๐‘˜) = ร”( โˆš ๐‘›๐‘˜)1 quantum queries are sufficient to solve (the decision version of) the Pattern Matching with Edits problem. However, the quantum time complexity of the underlying solution (that is, the computational overhead to recover the solution from the quantum queries) does not provide any improvement over classical computation. On the other hand, the state-of-the-art quantum algorithm for Pattern Matching with Mismatches [Jin and Nogler; SODA'23] achieves query complexity ร”( โˆš ๐‘›๐‘˜ 3/2 ) and time complexity ร•( โˆš ๐‘›๐‘˜ 2 ), falling short of a known unconditional lower bound of ฮฉ( โˆš ๐‘›๐‘˜) quantum queries. In this work, we present quantum algorithms with a time complexity of ร•( โˆš ๐‘›๐‘˜ + ๐‘›/๐‘š โ€ข ๐‘˜ 2 ) for Pattern Matching with Mismatches and ร”( โˆš ๐‘›๐‘˜ + ๐‘›/๐‘š โ€ข ๐‘˜ 3.5 ) for Pattern Matching with Edits; both algorithms use ร”( โˆš ๐‘›๐‘˜) quantum queries. These running times are near-optimal for ๐‘˜ โ‰ช ๐‘š 1/3 and ๐‘˜ โ‰ช ๐‘š 1/6 , respectively, and they offer advantage over classical algorithms for ๐‘˜ โ‰ช (๐‘š๐‘›) 1/4 and ๐‘˜ โ‰ช (๐‘š๐‘›) 1/7 , respectively. Our solutions can also report the starting positions of all approximate occurrences of ๐‘ƒ in ๐‘‡ (represented as collections of arithmetic progressions); in this case, both the unconditional lower bound and the complexities of our algorithms increase by a ฮ˜( ๐‘›/๐‘š) factor.

As a major technical contribution, we give a faster algorithm to solve a system of ๐‘ substring equations of the

The goal is to construct a generic solution string whose characters are equal only when necessary. While this is known to be possible in ๐’ช(๐‘› + ๐‘) time [Gawrychowski, Kociumaka, Radoszewski, Rytter, Wale ล„; TCS'16], we show that ร•(๐‘ 2 ) classical time is sufficient to obtain an ร•(๐‘)-size representation of ๐‘† that supports random access and other standard queries (of the so-called PILLAR model) in ๐’ช(log ๐‘›) time. We apply this tool to efficiently construct an ร•(๐‘˜)-size representation of strings ๐‘ƒ # and ๐‘‡ # obtained from ๐‘ƒ and ๐‘‡ by carefully masking out some characters so that the output to the studied approximate pattern matching problems does not change.

1 Throughout this paper, the ร•(โ€ข) and ร”(โ€ข) notations hide poly-logarithmic factors (log ๐‘) ๐’ช(1) and sub-polynomial factors ๐‘ ๐‘œ(1) , respectively, with respect to the total input size ๐‘ of the considered problems.

้—ฎ้—ฎ่ฟ™็ฏ‡ Paper

ๆ™บ่ƒฝไฝ“ไผš่ฏปๅฎŒๅ…จๆ–‡ใ€‚

Lune ๆŠŠ่ฟ™็ฏ‡ Paper ็ดขๅผ•ๅˆฐไบ†ๆฏไธ€ไธชๅ…ฌๅผ๏ผŒๅผ•็”จๅฎƒ็š„้กถไผš Paper ไนŸไธ€ๆ ทใ€‚ไฝ ๆ้—ฎ๏ผŒๅ›ž็ญ”็›ดๆŽฅๅผ•็”จๅŽŸๆ–‡ใ€‚

ๅฏไปฅไปŽ่ฟ™ไบ›้—ฎ้ข˜้—ฎ่ตท

ๆ™บ่ƒฝไฝ“่ฐƒ็”จ

Luneget_paper_fulltext

ๅœจ Lune ้‡Œ้—ฎ

ๅ…่ดนๅผ€ๅง‹๏ผŒๆ— ้œ€็ป‘ๅก

ๅผ•็”จๅฎƒ็š„้กถไผš Paper1

้—ฎ้—ฎๅฎƒไปฌๅ„่‡ชๆ€Žไนˆ็”จๅฎƒ

ๅฎƒๅผ•็”จ็š„้กถไผš Paper7

็›ธๅ…ณ Paper

้ป„ๆ˜็š„ๆตท้ข๏ผŒไธคไพงๆ˜ฏ็ป†็บฟๅ‹พๅ‹’็š„ๆ‚ฌๅด–