🤖 AI Summary
Quantum string matching faces efficiency bottlenecks, as existing quantum algorithms lack the practicality and versatility of classical bit-parallel approaches (e.g., Shift-And/Shift-Add).
Method: This work systematically reformulates classical bit-parallel string matching into a quantum paradigm. We introduce a quantum-state encoding scheme for bit-parallel masks, integrate Grover’s search to achieve quadratic speedup, and unify exact and k-error approximate matching within a single framework.
Contribution/Results: We establish the first systematic mapping from bit-parallel models to quantum circuits; present the first provably accelerated, general-purpose quantum bit-parallel string matcher with optimal time complexity O(√n), breaking the classical Ω(n) lower bound; and extend quantum acceleration to non-standard matching variants. Theoretical analysis confirms asymptotic optimality, while complexity evaluation and experimental validation demonstrate both efficacy and broad applicability—preserving algorithmic simplicity and scalability.
📝 Abstract
String matching is a fundamental problem in computer science, with critical applications in text retrieval, bioinformatics, and data analysis. Among the numerous solutions that have emerged for this problem in recent decades, bit-parallelism has significantly enhanced their practical efficiency, leading to the development of several optimized approaches for both exact and approximate string matching. However, their potential in quantum computing remains largely unexplored. This paper presents a novel pathway that not only translates bit-parallel string matching algorithms into the quantum framework but also enhances their performance to achieve a quadratic speedup through Grover's search. By embedding quantum search within a bit-parallel model, we reduce the time complexity of string matching, establishing a structured pathway for transforming classical algorithms into quantum solutions with provable computational advantages. Beyond exact matching, this technique offers a foundation for tackling a wide range of non-standard string matching problems, opening new avenues for efficient text searching in the quantum era. To demonstrate the simplicity and adaptability of the technique presented in this paper, we apply this translation and adaptation process to two landmark bit-parallel algorithms: Shift-And for exact pattern matching and Shift-Add for approximate string matching with up to k errors.