Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator

We study algorithms for solving three problems on strings. These are sorting of <i>n</i> strings of length <i>k</i>, “the Most Frequent String Search Problem”, and “searching intersection of two sequences of strings”. We construct quantum algorithms that are faster than class...

Full description

Bibliographic Details
Main Authors: Kamil Khadiev, Artem Ilikaev, Jevgenijs Vihrovs
Format: Article
Language:English
Published: MDPI AG 2022-01-01
Series:Mathematics
Subjects:
Online Access:https://www.mdpi.com/2227-7390/10/3/377
_version_ 1797486365001121792
author Kamil Khadiev
Artem Ilikaev
Jevgenijs Vihrovs
author_facet Kamil Khadiev
Artem Ilikaev
Jevgenijs Vihrovs
author_sort Kamil Khadiev
collection DOAJ
description We study algorithms for solving three problems on strings. These are sorting of <i>n</i> strings of length <i>k</i>, “the Most Frequent String Search Problem”, and “searching intersection of two sequences of strings”. We construct quantum algorithms that are faster than classical (randomized or deterministic) counterparts for each of these problems. The quantum algorithms are based on the quantum procedure for comparing two strings of length <i>k</i> in <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mi>O</mi><mo>(</mo><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></semantics></math></inline-formula> queries. The first problem is sorting <i>n</i> strings of length <i>k</i>. We show that classical complexity of the problem is <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mo>Θ</mo><mo>(</mo><mi>n</mi><mi>k</mi><mo>)</mo></mrow></semantics></math></inline-formula> for constant size alphabet, but our quantum algorithm has <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mover accent="true"><mi>O</mi><mo stretchy="false">˜</mo></mover><mrow><mo>(</mo><mi>n</mi><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></mrow></semantics></math></inline-formula> complexity. The second one is searching the most frequent string among <i>n</i> strings of length <i>k</i>. We show that the classical complexity of the problem is <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mo>Θ</mo><mo>(</mo><mi>n</mi><mi>k</mi><mo>)</mo></mrow></semantics></math></inline-formula>, but our quantum algorithm has <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mover accent="true"><mi>O</mi><mo stretchy="false">˜</mo></mover><mrow><mo>(</mo><mi>n</mi><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></mrow></semantics></math></inline-formula> complexity. The third problem is searching for an intersection of two sequences of strings. All strings have the same length <i>k</i>. The size of the first set is <i>n</i>, and the size of the second set is <i>m</i>. We show that the classical complexity of the problem is <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mo>Θ</mo><mo>(</mo><mo>(</mo><mi>n</mi><mo>+</mo><mi>m</mi><mo>)</mo><mi>k</mi><mo>)</mo></mrow></semantics></math></inline-formula>, but our quantum algorithm has <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mover accent="true"><mi>O</mi><mo stretchy="false">˜</mo></mover><mrow><mo>(</mo><mrow><mo>(</mo><mi>n</mi><mo>+</mo><mi>m</mi><mo>)</mo></mrow><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></mrow></semantics></math></inline-formula> complexity.
first_indexed 2024-03-09T23:33:09Z
format Article
id doaj.art-6873653bc38649a480a64537447a5cf2
institution Directory Open Access Journal
issn 2227-7390
language English
last_indexed 2024-03-09T23:33:09Z
publishDate 2022-01-01
publisher MDPI AG
record_format Article
series Mathematics
spelling doaj.art-6873653bc38649a480a64537447a5cf22023-11-23T17:06:31ZengMDPI AGMathematics2227-73902022-01-0110337710.3390/math10030377Quantum Algorithms for Some Strings Problems Based on Quantum String ComparatorKamil Khadiev0Artem Ilikaev1Jevgenijs Vihrovs2Institute of Computational Mathematics and Information Technologies, Kazan Federal University, Kremlevskaya 18, 420008 Kazan, RussiaInstitute of Computational Mathematics and Information Technologies, Kazan Federal University, Kremlevskaya 18, 420008 Kazan, RussiaCenter for Quantum Computer Science, Faculty of Computing, University of Latvia, Raina 19, LV-1586 Riga, LatviaWe study algorithms for solving three problems on strings. These are sorting of <i>n</i> strings of length <i>k</i>, “the Most Frequent String Search Problem”, and “searching intersection of two sequences of strings”. We construct quantum algorithms that are faster than classical (randomized or deterministic) counterparts for each of these problems. The quantum algorithms are based on the quantum procedure for comparing two strings of length <i>k</i> in <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mi>O</mi><mo>(</mo><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></semantics></math></inline-formula> queries. The first problem is sorting <i>n</i> strings of length <i>k</i>. We show that classical complexity of the problem is <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mo>Θ</mo><mo>(</mo><mi>n</mi><mi>k</mi><mo>)</mo></mrow></semantics></math></inline-formula> for constant size alphabet, but our quantum algorithm has <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mover accent="true"><mi>O</mi><mo stretchy="false">˜</mo></mover><mrow><mo>(</mo><mi>n</mi><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></mrow></semantics></math></inline-formula> complexity. The second one is searching the most frequent string among <i>n</i> strings of length <i>k</i>. We show that the classical complexity of the problem is <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mo>Θ</mo><mo>(</mo><mi>n</mi><mi>k</mi><mo>)</mo></mrow></semantics></math></inline-formula>, but our quantum algorithm has <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mover accent="true"><mi>O</mi><mo stretchy="false">˜</mo></mover><mrow><mo>(</mo><mi>n</mi><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></mrow></semantics></math></inline-formula> complexity. The third problem is searching for an intersection of two sequences of strings. All strings have the same length <i>k</i>. The size of the first set is <i>n</i>, and the size of the second set is <i>m</i>. We show that the classical complexity of the problem is <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mo>Θ</mo><mo>(</mo><mo>(</mo><mi>n</mi><mo>+</mo><mi>m</mi><mo>)</mo><mi>k</mi><mo>)</mo></mrow></semantics></math></inline-formula>, but our quantum algorithm has <inline-formula><math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><semantics><mrow><mover accent="true"><mi>O</mi><mo stretchy="false">˜</mo></mover><mrow><mo>(</mo><mrow><mo>(</mo><mi>n</mi><mo>+</mo><mi>m</mi><mo>)</mo></mrow><msqrt><mi>k</mi></msqrt><mo>)</mo></mrow></mrow></semantics></math></inline-formula> complexity.https://www.mdpi.com/2227-7390/10/3/377quantum computationquantum algorithmsstring processingsorting
spellingShingle Kamil Khadiev
Artem Ilikaev
Jevgenijs Vihrovs
Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator
Mathematics
quantum computation
quantum algorithms
string processing
sorting
title Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator
title_full Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator
title_fullStr Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator
title_full_unstemmed Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator
title_short Quantum Algorithms for Some Strings Problems Based on Quantum String Comparator
title_sort quantum algorithms for some strings problems based on quantum string comparator
topic quantum computation
quantum algorithms
string processing
sorting
url https://www.mdpi.com/2227-7390/10/3/377
work_keys_str_mv AT kamilkhadiev quantumalgorithmsforsomestringsproblemsbasedonquantumstringcomparator
AT artemilikaev quantumalgorithmsforsomestringsproblemsbasedonquantumstringcomparator
AT jevgenijsvihrovs quantumalgorithmsforsomestringsproblemsbasedonquantumstringcomparator