Longest Common Substring and Longest Palindromic Substring in π’ͺΜƒ(√(n)) Time

09/03/2023
βˆ™
by   Domenico Cantone, et al.
βˆ™
0
βˆ™

The Longest Common Substring (LCS) and Longest Palindromic Substring (LPS) are classical problems in computer science, representing fundamental challenges in string processing. Both problems can be solved in linear time using a classical model of computation, by means of very similar algorithms, both relying on the use of suffix trees. Very recently, two sublinear algorithms for LCS and LPS in the quantum query model have been presented by Le Gall and SeddighinΒ <cit.>, requiring π’ͺΜƒ(n^5/6) and π’ͺΜƒ(√(n)) queries, respectively. However, while the query model is fascinating from a theoretical standpoint, its practical applicability becomes limited when it comes to crafting algorithms meant for actual execution on real hardware. In this paper we present, for the first time, a π’ͺΜƒ(√(n)) quantum algorithm for both LCS and LPS working in the circuit model of computation. Our solutions are simpler than previous ones and can be easily translated into quantum procedures. We also present actual implementations of the two algorithms as quantum circuits working in π’ͺ(√(n)log^5(n)) and π’ͺ(√(n)log^4(n)) time, respectively.

READ FULL TEXT
research
βˆ™ 10/23/2020

Quantum Meets Fine-grained Complexity: Sublinear Time Quantum Algorithms for String Problems

Longest common substring (LCS), longest palindrome substring (LPS), and ...
research
βˆ™ 10/19/2021

Near-Optimal Quantum Algorithms for String Problems

We study quantum algorithms for several fundamental string problems, inc...
research
βˆ™ 05/18/2021

Time and Query Optimal Quantum Algorithms Based on Decision Trees

It has recently been shown that starting with a classical query algorith...
research
βˆ™ 08/01/2020

Fast Classical and Quantum Algorithms for Online k-server Problem on Trees

We consider online algorithms for the k-server problem on trees. Chrobak...
research
βˆ™ 10/17/2022

A Note on Quantum Divide and Conquer for Minimal String Rotation

Lexicographically minimal string rotation is a fundamental problem on st...
research
βˆ™ 08/22/2023

Quantum Circuits for Fixed Substring Matching Problems

Quantum computation represents a computational paradigm whose distinctiv...
research
βˆ™ 01/29/2019

ReQWIRE: Reasoning about Reversible Quantum Circuits

Common quantum algorithms make heavy use of ancillae: scratch qubits tha...

Please sign up or login with your details

Forgot password? Click here to reset