Skip to main content

Quantum Algorithms for the Most Frequently String Search, Intersection of Two String Sequences and Sorting of Strings Problems

  • Conference paper
  • First Online:
Theory and Practice of Natural Computing (TPNC 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11934))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Aaronson, S., Shi, Y.: Quantum lower bounds for the collision and the element distinctness problems. J. ACM (JACM) 51(4), 595–605 (2004)

    Article  MathSciNet  Google Scholar 

  2. 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)

    Google Scholar 

  3. Aggarwal, C.C.: Data Streams: Models and Algorithms, vol. 31. Springer, Berlin (2007). https://doi.org/10.1007/978-0-387-47534-9

    Book  MATH  Google Scholar 

  4. Ambainis, A.: Understanding quantum algorithms via query complexity. arXiv:1712.06349 (2017)

  5. 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)

    Google Scholar 

  6. Ambainis, A.: Quantum walk algorithm for element distinctness. SIAM J. Comput. 37(1), 210–239 (2007)

    Article  MathSciNet  Google Scholar 

  7. Becchetti, L., Chatzigiannakis, I., Giannakopoulos, Y.: Streaming techniques and data aggregation in networks of tiny artefacts. Comput. Sci. Rev. 5(1), 27–46 (2011)

    Article  Google Scholar 

  8. Bennett, C.H., Bernstein, E., Brassard, G., Vazirani, U.: Strengths and weaknesses of quantum computing. SIAM J. Comput. 26(5), 1510–1523 (1997)

    Article  MathSciNet  Google Scholar 

  9. Black, P.E.: Dictionary of algorithms and data structures. Technical report, NIST (1998)

    Google Scholar 

  10. 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)

    Article  MathSciNet  Google Scholar 

  11. Boyer, M., Brassard, G., Høyer, P., Tapp, A.: Tight bounds on quantum searching. Fortschr. Phys. 46(4–5), 493–505 (1998)

    Article  Google Scholar 

  12. Brass, P.: Advanced data structures, vol. 193. Cambridge University Press, Cambridge (2008)

    Book  Google Scholar 

  13. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. McGraw-Hill, New York (2001)

    MATH  Google Scholar 

  14. Cormode, G., Hadjieleftheriou, M.: Finding frequent items in data streams. Proc. VLDB Endow. 1(2), 1530–1541 (2008)

    Article  Google Scholar 

  15. De La Briandais, R.: File searching using variable length keys. In: Western Joint Computer Conference, 3–5 March 1959, pp. 295–298. ACM (1959)

    Google Scholar 

  16. De Wolf, R.: Quantum computing and communication complexity (2001)

    Google Scholar 

  17. 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)

    Google Scholar 

  18. Guibas, L.J., Sedgewick, R.: A dichromatic framework for balanced trees. In: Proceedings of SFCS 1978, pp. 8–21. IEEE (1978)

    Google Scholar 

  19. 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

    Chapter  MATH  Google Scholar 

  20. Høyer, P., Neerbek, J., Shi, Y.: Quantum complexities of ordered searching, sorting, and element distinctness. Algorithmica 34(4), 429–448 (2002)

    Article  MathSciNet  Google Scholar 

  21. Jordan, S.: Bounded error quantum algorithms zoo. https://math.nist.gov/quantum/zoo

  22. 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

    Chapter  MATH  Google Scholar 

  23. 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

    Chapter  MATH  Google Scholar 

  24. 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)

    Google Scholar 

  25. Knuth, D.: Searching and Sorting, The Art of Computer Programming, vol. 3 (1973)

    Google Scholar 

  26. Kothari, R.: An optimal quantum algorithm for the oracle identification problem. In: 31st International Symposium on Theoretical Aspects of Computer Science, p. 482 (2014)

    Google Scholar 

  27. 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)

    Google Scholar 

  28. 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)

    MathSciNet  MATH  Google Scholar 

  29. Long, G.L.: Grover algorithm with zero theoretical failure rate. Phys. Rev. A 64(2), 022307 (2001)

    Article  Google Scholar 

  30. Montanaro, A.: Quantum pattern matching fast on average. Algorithmica 77(1), 16–39 (2017)

    Article  MathSciNet  Google Scholar 

  31. Muthukrishnan, S.: Data streams: algorithms and applications. Found. Trends Theor. Comput. Sci. 1(2), 117–236 (2005)

    Article  MathSciNet  Google Scholar 

  32. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2010)

    Book  Google Scholar 

  33. 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)

    Google Scholar 

  34. 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)

    Google Scholar 

  35. Ramesh, H., Vinay, V.: String matching in \(o (\sqrt{n}+ \sqrt{m})\) quantum time. J. Discrete Algorithms 1(1), 103–110 (2003)

    Article  MathSciNet  Google Scholar 

  36. Williams, J.W.J.: Algorithm 232 - heapsort. Commun. ACM 7(6), 347–349 (1964)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Kamil Khadiev .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics