Near-Optimal Quantum Algorithms for String Problems
Shyan Akmal, Ce Jin
Abstract
We study quantum algorithms for several fundamental string problems, including Longest Common Substring, Lexicographically Minimal String Rotation, and Longest Square Substring. These problems have been widely studied in the stringology literature since the 1970s, and are known to be solvable by near-linear time classical algorithms. In this work, we give quantum algorithms for these problems with near-optimal query complexities and time complexities. Specifically, we show that:
• Longest Common Substring can be solved by a quantum algorithm in Õ(n 2/3 ) time, improving upon the recent Õ(n 5/6 )-time algorithm by Le Gall and Seddighin (2020). Our algorithm uses the MNRS quantum walk framework, together with a careful combination of string synchronizing sets (Kempa and Kociumaka, 2019) and generalized difference covers.
• Lexicographically Minimal String Rotation can be solved by a quantum algorithm in n 1/2+o(1) time, improving upon the recent Õ(n 3/4 )-time algorithm by Wang and Ying (2020). We design our algorithm by first giving a new classical divide-and-conquer algorithm in near-linear time based on exclusion rules, and then speeding it up quadratically using nested Grover search and quantum minimum finding.
• Longest Square Substring can be solved by a quantum algorithm in Õ( √ n) time. Our algorithm is an adaptation of the algorithm by Le Gall and Seddighin (2020) for the Longest Palindromic Substring problem, but uses additional techniques to overcome the difficulty that binary search no longer applies.
Our techniques naturally extend to other related string problems, such as Longest Repeated Substring, Longest Lyndon Substring, and Minimal Suffix.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 73f74ffa-472f-494c-95ff-bf5b5e8a5053Cited by top-tier papers5
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed SpaceDominik Kempa, Tomasz KociumakaFOCS 2023 · 20 citations
- Quantum Speed-ups for String Synchronizing Sets, Longest Common Substring, and k-mismatch MatchingCe Jin, Jakob NoglerSODA 2023 · 10 citations
- Near-Optimal Quantum Algorithms for Bounded Edit Distance and Lempel-Ziv FactorizationDaniel Gibney, Ce Jin, Tomasz Kociumaka, Sharma V. ThankachanSODA 2024 · 7 citations
- On the Communication Complexity of Approximate Pattern MatchingTomasz Kociumaka, Jakob Nogler, Philip WellnitzSTOC 2024 · 2 citations
- Dynamic suffix array with polylogarithmic queries and updatesDominik Kempa, Tomasz KociumakaSTOC 2022
Builds on2
Related papers
- Near-Optimal-Time Quantum Algorithms for Approximate Pattern MatchingTomasz Kociumaka, Jakob Nogler, Philip WellnitzSODA 2025 · 1 citation
- Near-Optimal Quantum Algorithm for Minimizing the Maximal LossHao Wang, Chenyi Zhang, Tongyang LiICLR 2024 · 1 citation
- Improved Algorithms for Edit Distance and LCS: Beyond Worst CaseMahdi Boroujeni, Masoud Seddighin, Saeed SeddighinSODA 2020 · 8 citations
- Approximating Binary Longest Common Subsequence in Almost-Linear TimeXiaoyu He, Ray LiSTOC 2023
- Lempel-Ziv (LZ77) Factorization in Sublinear TimeDominik Kempa, Tomasz KociumakaFOCS 2024 · 2 citations
