Skip to main content

Quantum and Approximation Algorithms for Maximum Witnesses of Boolean Matrix Products

  • Conference paper
  • First Online:
Algorithms and Discrete Applied Mathematics (CALDAM 2021)

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

Included in the following conference series:


The problem of finding maximum (or minimum) witnesses of the Boolean product of two Boolean matrices (MW for short) has a number of important applications, in particular the all-pairs lowest common ancestor (LCA) problem in directed acyclic graphs (dags). The best known upper time-bound on the MW problem for \(n\times n\) Boolean matrices of the form \(O(n^{2.575})\) has not been substantially improved since 2006. In order to obtain faster algorithms for this problem, we study quantum algorithms for MW and approximation algorithms for MW (in the standard computational model). Some of our quantum algorithms are input or output sensitive. Our fastest quantum algorithm for the MW problem, and consequently for the related problems, runs in time \(\tilde{O}(n^{2+\lambda /2})=\tilde{O}(n^{2.434})\), where \(\lambda \) satisfies the equation \(\omega (1, \lambda , 1) = 1 + 1.5 \, \lambda \) and \(\omega (1, \lambda , 1)\) is the exponent of the multiplication of an \(n \times n^{\lambda }\) matrix by an \(n^{\lambda } \times n\) matrix. Next, we consider a relaxed version of the MW problem (in the standard model) asking for reporting a witness of bounded rank (the maximum witness has rank 1) for each non-zero entry of the matrix product. First, by adapting the fastest known algorithm for maximum witnesses, we obtain an algorithm for the relaxed problem that reports for each non-zero entry of the product matrix a witness of rank at most \(\ell \) in time \(\tilde{O}((n/\ell )n^{\omega (1,\log _n \ell ,1)}).\) Then, by reducing the relaxed problem to the so called k-witness problem, we provide an algorithm that reports for each non-zero entry C[ij] of the product matrix C a witness of rank \(O(\lceil W_C(i,j)/k\rceil )\), where \(W_C(i,j)\) is the number of witnesses for C[ij], with high probability. The algorithm runs in \(\tilde{O}(n^{\omega }k^{0.4653} +n^{2+o(1)}k)\) time, where \(\omega =\omega (1,1,1)\).

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

Access this chapter

USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.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

Similar content being viewed by others


  1. 1.

    For somewhat related applications of the quantum minimum search of Dürr and Høyer to shortest path problems see [16].


  1. Alon, N., Galil, Z., Margalit, O., Naor, M.: Witnesses for Boolean matrix multiplication and for shortest paths. In: Proceedings of 33rd Symposium on Foundations of Computer Science (FOCS), pp. 417–426 (1992)

    Google Scholar 

  2. Alon, N., Naor, M.: Derandomization, witnesses for Boolean matrix multiplication and construction of perfect hash functions. Algorithmica 16, 434–449 (1996)

    Article  MathSciNet  Google Scholar 

  3. Ambainis, A.: Quantum search algorithms. SIGACT News 35(2), 22–35 (2004)

    Article  Google Scholar 

  4. Coppersmith, D.: Rectangular matrix multiplication revisited. J. Symb. Comput. 1, 42–49 (1997)

    MathSciNet  MATH  Google Scholar 

  5. Cohen, K., Yuster, R.: On minimum witnesses for Boolean matrix multiplication. Algorithmica 69(2), 431–442 (2014)

    Article  MathSciNet  Google Scholar 

  6. Czumaj, A., Kowaluk, M., Lingas, A.: Faster algorithms for finding lowest common ancestors in directed acyclic graphs. Theor. Comput. Sci. 380(1–2), 37–46 (2007)

    Article  MathSciNet  Google Scholar 

  7. Dürr, C., Høyer, P.: A quantum algorithm for finding the minimum. arXiv: 9607.014 (1996/1999)

  8. Gąsieniec, L., Kowaluk, M., Lingas, A.: Faster multi-witnesses for Boolean matrix product. Inf. Process. Lett. 109, 242–247 (2009)

    Article  Google Scholar 

  9. Grandoni, F., Italiano, G.F., Lukasiewicz, A. Parotsidis, N., Uznanski, P.: All-Pairs LCA in DAGs: breaking through the \(O(n^{2.5})\) barrier. To Appear in Proc. SODA 2021. CoRR abs/2007.08914 (2020)

    Google Scholar 

  10. Grover. L.K.: A fast quantum mechanical algorithm for database search. In: Proceedings of Annual ACM Symposium on Theory of Computing (STOC), pp. 212–219 (1996)

    Google Scholar 

  11. Huang, X., Pan, V.Y.: Fast rectangular matrix multiplications and applications. J. Complex. 14, 257–299 (1998)

    Article  MathSciNet  Google Scholar 

  12. Kowaluk, M., Lingas, A.: Quantum and approximation algorithms for maximum witnesses of Boolean matrix products. CoRR abs/2004.14064 (2020)

    Google Scholar 

  13. Le Gall, F.: Powers of tensors and fast matrix multiplication. In: Proceedings of 39th International Symposium on Symbolic and Algebraic Computation, pp. 296–303 (2014)

    Google Scholar 

  14. Gall, F.: A time-efficient output-sensitive quantum algorithm for Boolean matrix multiplication. In: Chao, K.-M., Hsu, T., Lee, D.-T. (eds.) ISAAC 2012. LNCS, vol. 7676, pp. 639–648. Springer, Heidelberg (2012).

    Chapter  Google Scholar 

  15. Le Gall, F., Urrutia, F.: Improved rectangular matrix multiplication using powers of the Coppersmith-Winograd tensor. In: Proceedings of SODA 2018, pp. 1029–1046 (2018)

    Google Scholar 

  16. Navebi, A., Vassilevska Williams, V.: Quantum algorithms for shortest path problems in structured instances. arXiv:1410.6220 (2014)

  17. Nielsen, M., Chuang, I.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)

    MATH  Google Scholar 

  18. Shapira, A., Yuster, R., Zwick, U.: All-pairs bottleneck paths in vertex weighted graphs. Algorithmica 59, 621–633 (2011)

    Article  MathSciNet  Google Scholar 

  19. Vassilevska, V., Williams, R., Yuster, R.: Finding heaviest H-subgraphs in real weighted graphs, with applications. ACM Trans. Algorithms 6(3), 441–4423 (2010)

    Article  MathSciNet  Google Scholar 

  20. Vassilevska Williams, V.: Multiplying matrices faster than Coppersmith-Winograd. In: Proceedings of 44th Annual ACM Symposium on Theory of Computing (STOC), pp. 887–898 (2012)

    Google Scholar 

Download references


The authors thank Francois Le Gall for a useful clarification of the current status of quantum algorithms for Boolean matrix product. The research has been supported in part by Swedish Research Council grant 621-2017-03750.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Mirosław Kowaluk .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kowaluk, M., Lingas, A. (2021). Quantum and Approximation Algorithms for Maximum Witnesses of Boolean Matrix Products. In: Mudgal, A., Subramanian, C.R. (eds) Algorithms and Discrete Applied Mathematics. CALDAM 2021. Lecture Notes in Computer Science(), vol 12601. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-67898-2

  • Online ISBN: 978-3-030-67899-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics