Abstract
We study algorithms for solving three problems on strings. The first one is the Most Frequently String Search Problem. The problem is the following. Assume that we have a sequence of n strings of length k. The problem is finding the string that occurs in the sequence most often. We propose a quantum algorithm that has a query complexity \(\tilde{O}(n \sqrt{k})\). This algorithm shows speed-up comparing with the deterministic algorithm that requires \(\varOmega (nk)\) queries.
The second one is searching intersection of two sequences of strings. All strings have the same length k. The size of the first set is n and the size of the second set is m. We propose a quantum algorithm that has a query complexity \(\tilde{O}((n+m) \sqrt{k})\). This algorithm shows speed-up comparing with the deterministic algorithm that requires \(\varOmega ((n+m)k)\) queries.
The third problem is sorting of n strings of length k. On the one hand, it is known that quantum algorithms cannot sort objects asymptotically faster than classical ones. On the other hand, we focus on sorting strings that are not arbitrary objects. We propose a quantum algorithm that has a query complexity \(O(n (\log n)^2 \sqrt{k})\). This algorithm shows speed-up comparing with the deterministic algorithm (radix sort) that requires \(\varOmega ((n+d)k)\) queries, where d is a size of the alphabet.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Aaronson, S., Shi, Y.: Quantum lower bounds for the collision and the element distinctness problems. J. ACM (JACM) 51(4), 595–605 (2004)
Adel’son-Vel’skii, G.M., Landis, E.M.: An algorithm for organization of information. In: Doklady Akademii Nauk, vol. 146, pp. 263–266. Russian Academy of Sciences (1962)
Aggarwal, C.C.: Data Streams: Models and Algorithms, vol. 31. Springer, Berlin (2007). https://doi.org/10.1007/978-0-387-47534-9
Ambainis, A.: Understanding quantum algorithms via query complexity. arXiv:1712.06349 (2017)
Ambainis, A.: Quantum walk algorithm for element distinctness. In: Proceedings of the 45th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2004, pp. 22–31 (2004)
Ambainis, A.: Quantum walk algorithm for element distinctness. SIAM J. Comput. 37(1), 210–239 (2007)
Becchetti, L., Chatzigiannakis, I., Giannakopoulos, Y.: Streaming techniques and data aggregation in networks of tiny artefacts. Comput. Sci. Rev. 5(1), 27–46 (2011)
Bennett, C.H., Bernstein, E., Brassard, G., Vazirani, U.: Strengths and weaknesses of quantum computing. SIAM J. Comput. 26(5), 1510–1523 (1997)
Black, P.E.: Dictionary of algorithms and data structures. Technical report, NIST (1998)
Boyar, J., Larsen, K.S., Maiti, A.: The frequent items problem in online streaming under various performance measures. Int. J. Found. Comput. Sci. 26(4), 413–439 (2015)
Boyer, M., Brassard, G., Høyer, P., Tapp, A.: Tight bounds on quantum searching. Fortschr. Phys. 46(4–5), 493–505 (1998)
Brass, P.: Advanced data structures, vol. 193. Cambridge University Press, Cambridge (2008)
Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. McGraw-Hill, New York (2001)
Cormode, G., Hadjieleftheriou, M.: Finding frequent items in data streams. Proc. VLDB Endow. 1(2), 1530–1541 (2008)
De La Briandais, R.: File searching using variable length keys. In: Western Joint Computer Conference, 3–5 March 1959, pp. 295–298. ACM (1959)
De Wolf, R.: Quantum computing and communication complexity (2001)
Grover, L.K.: A fast quantum mechanical algorithm for database search. In: Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, pp. 212–219. ACM (1996)
Guibas, L.J., Sedgewick, R.: A dichromatic framework for balanced trees. In: Proceedings of SFCS 1978, pp. 8–21. IEEE (1978)
Høyer, P., Neerbek, J., Shi, Y.: Quantum complexities of ordered searching, sorting, and element distinctness. In: Orejas, F., Spirakis, P.G., van Leeuwen, J. (eds.) ICALP 2001. LNCS, vol. 2076, pp. 346–357. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-48224-5_29
Høyer, P., Neerbek, J., Shi, Y.: Quantum complexities of ordered searching, sorting, and element distinctness. Algorithmica 34(4), 429–448 (2002)
Jordan, S.: Bounded error quantum algorithms zoo. https://math.nist.gov/quantum/zoo
Kravchenko, D., Khadiev, K., Serov, D.: On the quantum and classical complexity of solving subtraction games. In: van Bevern, R., Kucherov, G. (eds.) CSR 2019. LNCS, vol. 11532, pp. 228–236. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-19955-5_20
Khadiev, K., Safina, L.: Quantum algorithm for dynamic programming approach for DAGs. Applications for Zhegalkin polynomial evaluation and some problems on DAGs. In: McQuillan, I., Seki, S. (eds.) UCNC 2019. LNCS, vol. 11493, pp. 150–163. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-19311-9_13
Klauck, H.: Quantum time-space tradeoffs for sorting. In: Proceedings of the Thirty-Fifth Annual ACM Symposium on Theory of Computing, pp. 69–76. ACM (2003)
Knuth, D.: Searching and Sorting, The Art of Computer Programming, vol. 3 (1973)
Kothari, R.: An optimal quantum algorithm for the oracle identification problem. In: 31st International Symposium on Theoretical Aspects of Computer Science, p. 482 (2014)
Lin, C.Y.Y., Lin, H.H.: Upper bounds on quantum query complexity inspired by the Elitzur-Vaidman bomb tester. In: 30th Conference on Computational Complexity (CCC 2015). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2015)
Lin, C.Y.Y., Lin, H.H.: Upper bounds on quantum query complexity inspired by the Elitzur-Vaidman bomb tester. Theory Comput. 12(18), 1–35 (2016)
Long, G.L.: Grover algorithm with zero theoretical failure rate. Phys. Rev. A 64(2), 022307 (2001)
Montanaro, A.: Quantum pattern matching fast on average. Algorithmica 77(1), 16–39 (2017)
Muthukrishnan, S.: Data streams: algorithms and applications. Found. Trends Theor. Comput. Sci. 1(2), 117–236 (2005)
Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2010)
Odeh, A., Abdelfattah, E.: Quantum sort algorithm based on entanglement qubits \(\{\)00, 11\(\}\). In: 2016 IEEE Long Island Systems, Applications and Technology Conference (LISAT), pp. 1–5. IEEE (2016)
Odeh, A., Elleithy, K., Almasri, M., Alajlan, A.: Sorting N elements using quantum entanglement sets. In: Third International Conference on Innovative Computing Technology (INTECH 2013), pp. 213–216. IEEE (2013)
Ramesh, H., Vinay, V.: String matching in \(o (\sqrt{n}+ \sqrt{m})\) quantum time. J. Discrete Algorithms 1(1), 103–110 (2003)
Williams, J.W.J.: Algorithm 232 - heapsort. Commun. ACM 7(6), 347–349 (1964)
Acknowledgments
This work was supported by Russian Science Foundation Grant 19-71-00149. We thank Aliya Khadieva, Farid Ablayev and Kazan Federal University quantum group for useful discussions.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Khadiev, K., Ilikaev, A. (2019). Quantum Algorithms for the Most Frequently String Search, Intersection of Two String Sequences and Sorting of Strings Problems. In: MartÃn-Vide, C., Pond, G., Vega-RodrÃguez, M. (eds) Theory and Practice of Natural Computing. TPNC 2019. Lecture Notes in Computer Science(), vol 11934. Springer, Cham. https://doi.org/10.1007/978-3-030-34500-6_17
Download citation
DOI: https://doi.org/10.1007/978-3-030-34500-6_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-34499-3
Online ISBN: 978-3-030-34500-6
eBook Packages: Computer ScienceComputer Science (R0)