Skip to main content
Log in

Quantum bounds for 2D-grid and Dyck language

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

This article has been updated

Abstract

We study the quantum query complexity of two problems. First, we consider the problem of determining whether a sequence of parentheses is a properly balanced one (a Dyck word), with a depth of at most k. We call this the \({{\,\mathrm{\textsc {Dyck}}\,}}_{k,n}\) problem. We prove a lower bound of \(\Omega (c^k \sqrt{n})\), showing that the complexity of this problem increases exponentially in k. Here n is the length of the word. When k is a constant, this is interesting as a representative example of star-free languages for which a surprising \({\tilde{O}}(\sqrt{n})\) query quantum algorithm was recently constructed by Aaronson et al. (Electron Colloquium Comput Complex (ECCC) 26:61, 2018). Their proof does not give rise to a general algorithm. When k is not a constant, \({{\,\mathrm{\textsc {Dyck}}\,}}_{k,n}\) is not context-free. We give an algorithm with \(O\left( \sqrt{n}(\log {n})^{0.5k}\right) \) quantum queries for \({{\,\mathrm{\textsc {Dyck}}\,}}_{k,n}\) for all k. This is better than the trivial upper bound n for \(k=o\left( \frac{\log (n)}{\log \log n}\right) \). Second, we consider connectivity problems on grid graphs in 2 dimensions, if some of the edges of the grid may be missing. By embedding the “balanced parentheses” problem into the grid, we show a lower bound of \(\Omega (n^{1.5-\epsilon })\) for the directed 2D grid and \(\Omega (n^{2-\epsilon })\) for the undirected 2D grid. We present two algorithms for particular cases of the problem. The directed problem is interesting as a black-box model for a class of classical dynamic programming strategies including the one that is usually used for the well-known edit distance problem. We also show a generalization of this result to more than 2 dimensions

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Data availability

Data sharing is not applicable to this article as no new data were created or analyzed in this study.

Change history

  • 21 May 2023

    The e-mail address of the author Janis Iraids has been corrected.

Notes

  1. Aaronson et al. [7] also give a bound of \(O(\sqrt{n} \log ^{m-1} n)\) but in this case m is the rank of the syntactic monoid, which can be exponentially larger than k.

References

  1. Ambainis, A., Balodis, K., Iraids, J., Khadiev, K., Kļevickis, V., Prūsis, K., Shen, Y., Smotrovs, J., Vihrovs, J.: Quantum lower and upper bounds for 2D-grid and Dyck language. In: 45th International Symposium on Mathematical Foundations of Computer Science (MFCS 2020). Leibniz International Proceedings in Informatics (LIPIcs), vol. 170, pp. 8–1814 (2020)

  2. Shor, P.W.: Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM J. Comput. 26(5), 1484–1509 (1997). https://doi.org/10.1137/s0097539795293172

    Article  MathSciNet  MATH  Google Scholar 

  3. Cirac, J.I., Zoller, P.: Goals and opportunities in quantum simulation. Nat. Phys. 8(4), 264–266 (2012). https://doi.org/10.1038/nphys2275

    Article  Google Scholar 

  4. Georgescu, I.M., Ashhab, S., Nori, F.: Quantum simulation. Rev. Mod. Phys. 86, 153–185 (2014). https://doi.org/10.1103/RevModPhys.86.153

    Article  ADS  Google Scholar 

  5. Ambainis, A.: Understanding quantum algorithms via query complexity. In: Proceedings of the International Congress of Mathematicians, vol. 4, pp. 3283–3304 (2018)

  6. Hopcroft, J.E., Motwani, R., Ullman, J.D.: Automata theory, languages, and computation. Int. Ed. 24(2), 171–183 (2006)

    MATH  Google Scholar 

  7. Aaronson, S., Grier, D., Schaeffer, L.: A quantum query complexity trichotomy for regular languages. Electron Colloquium Comput Complex (ECCC) 26, 61 (2018)

    Google Scholar 

  8. Davis, M., Sigal, R., Weyuker, E.J.: Computability, Complexity, and Languages: Fundamentals of Theoretical Computer Science. Elsevier, Amsterdam (1994)

    Google Scholar 

  9. Khadiev, K., Kravchenko, D.: Quantum algorithm for Dyck language with multiple types of brackets. In: Unconventional Computation and Natural Computation, pp. 68–83 (2021)

  10. Buhrman, H., Patro, S., Speelman, F.: The Quantum Strong Exponential-Time Hypothesis (2019)

  11. 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  MATH  Google Scholar 

  12. Wagner, R.A., Fischer, M.J.: The string-to-string correction problem. J. ACM (JACM) 21(1), 168–173 (1974)

    Article  MathSciNet  MATH  Google Scholar 

  13. Backurs, A., Indyk, P.: Edit distance cannot be computed in strongly subquadratic time (unless SETH is false). In: Proceedings of the Forty-Seventh Annual ACM Symposium on Theory of Computing, pp. 51–58. ACM (2015)

  14. Boroujeni, M., Ehsani, S., Ghodsi, M., HajiAghayi, M., Seddighin, S.: Approximating edit distance in truly subquadratic time: quantum and MapReduce. In: Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1170–1189. SIAM (2018)

  15. Chakraborty, D., Das, D., Goldenberg, E., Koucký, M., Saks, M.E.: Approximating edit distance within constant factor in truly sub-quadratic time. In: 59th Annual IEEE Symposium on Foundations of Computer Science (FOCS), Paris, France, Oct. 7–9, 2018, pp. 979–990 (2018)

  16. Krinner, S., Lacroix, N., Remm, A., Paolo, A.D., Genois, E., Leroux, C., Hellings, C., Lazar, S., Swiadek, F., Herrmann, J., Norris, G.J., Andersen, C.K., Müller, M., Blais, A., Eichler, C., Wallraff, A.: Realizing repeated quantum error correction in a distance-three surface code. Nature 605(7911), 669–674 (2022). https://doi.org/10.1038/s41586-022-04566-8

    Article  ADS  Google Scholar 

  17. Collins, H., Nay, C.: IBM unveils 400 qubit-plus quantum processor and next-generation IBM quantum system two (2022). https://newsroom.ibm.com/2022-11-09-IBM-Unveils-400-Qubit-Plus-Quantum-Processor-and-Next-Generation-IBM-Quantum-System-Two

  18. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information: 10th Anniversary Edition, 10th edn. Cambridge University Press, New York (2011)

    MATH  Google Scholar 

  19. Ablayev, F., Ablayev, M., Huang, J.Z., Khadiev, K., Salikhova, N., Wu, D.: On quantum methods for machine learning problems part I: Quantum tools. Big Data Min. Anal. 3(1), 41–55 (2019)

    Article  Google Scholar 

  20. Khadiev, K.: Lecture notes on quantum algorithms. arXiv:2212.14205 (2022)

  21. Reichardt, B.W.: Reflections for quantum query algorithms. In: Proceedings of the Twenty-second Annual ACM-SIAM Symposium on Discrete Algorithms. SODA ’11, pp. 560–569. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA (2011). http://dl.acm.org/citation.cfm?id=2133036.2133080

  22. Kimmel, S.: Quantum adversary (upper) bound. In: International Colloquium on Automata, Languages, and Programming, pp. 557–568. Springer (2012)

  23. Høyer, P., Mosca, M., de Wolf, R.: Quantum search on bounded-error inputs. In: Baeten, J.C.M., Lenstra, J.K., Parrow, J., Woeginger, G.J. (eds.) Automata, Languages and Programming, pp. 291–299. Springer, Berlin (2003)

    Chapter  Google Scholar 

  24. Kapralov, R., Khadiev, K., Mokut, J., Shen, Y., Yagafarov, M.: Fast classical and quantum algorithms for online k-server problem on trees. arXiv:2008.00270 (2020)

  25. Ambainis, A.: Quantum lower bounds by quantum arguments. J. Comput. Syst. Sci. 64(4), 750–767 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  26. Reichardt, B.W.: Span programs are equivalent to quantum query algorithms. SIAM J. Comput. 43(3), 1206–1219 (2014). https://doi.org/10.1137/100792640

    Article  MathSciNet  MATH  Google Scholar 

  27. Ambainis, A., Childs, A.M., Reichardt, B., Spalek, R., Zhang, S.: Any AND-OR formula of size N can be evaluated in time n\({}^{\text{1/2+o(1) }}\) on a quantum computer. SIAM J. Comput. 39(6), 2513–2530 (2010). https://doi.org/10.1137/080712167

    Article  MathSciNet  MATH  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. Kothari, R.: An optimal quantum algorithm for the oracle identification problem. In: 31st International Symposium on Theoretical Aspects of Computer Science, p. 482 (2014)

  30. Belovs, A., Reichardt, B.W.: Span programs and quantum algorithms for ST-connectivity and claw detection. In: Algorithms-ESA 2012-20th Annual European Symposium, Ljubljana, Slovenia, September 10–12, 2012. Proceedings, pp. 193–204 (2012). https://doi.org/10.1007/978-3-642-33090-2_18

  31. Ambainis, A., Balodis, K., Iraids, J., Kokainis, M., Prusis, K., Vihrovs, J.: Quantum speedups for exponential-time dynamic programming algorithms. In: Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2019, San Diego, California, USA, January 6–9, 2019, pp. 1783–1793 (2019). https://doi.org/10.1137/1.9781611975482.107

Download references

Acknowledgements

The research is supported by QuantERA ERA-NET Cofund in Quantum Technologies implemented within the European Union’s Horizon 2020 Programme (QuantAlgo project) and ERDF Project 1.1.1.5/18/A/020 “Quantum algorithms: from complexity theory to experiment” Kamil Khadiev has been supported by the Kazan Federal University Strategic Academic Leadership Program (“PRIORITY-2030”); a part of his research (Theorem 10) was funded by the subsidy allocated to Kazan Federal University for the state assignment in the sphere of scientific activities, project No. 0671-2020-0065. Yixin Shen is supported by EPSRC grant EP/W02778X/1. We thank Frédéric Magniez for helpful discussions. Part of the work was done during Kamil Khadiev’s visit to IRIF, Université Paris Cité.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Kamil Khadiev or Yixin Shen.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

The paper is an extended version of the conference paper [1] that was presented at MFCS2020.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ambainis, A., Balodis, K., Iraids, J. et al. Quantum bounds for 2D-grid and Dyck language. Quantum Inf Process 22, 194 (2023). https://doi.org/10.1007/s11128-023-03910-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11128-023-03910-9

Keywords

Navigation