## Abstract

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*[*i*, *j*] 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*[*i*, *j*], 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)\).

## Access this chapter

Tax calculation will be finalised at checkout

Purchases are for personal use only

### Similar content being viewed by others

## Notes

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

## References

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)

Alon, N., Naor, M.: Derandomization, witnesses for Boolean matrix multiplication and construction of perfect hash functions. Algorithmica

**16**, 434–449 (1996)Ambainis, A.: Quantum search algorithms. SIGACT News

**35**(2), 22–35 (2004)Coppersmith, D.: Rectangular matrix multiplication revisited. J. Symb. Comput.

**1**, 42–49 (1997)Cohen, K., Yuster, R.: On minimum witnesses for Boolean matrix multiplication. Algorithmica

**69**(2), 431–442 (2014)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)Dürr, C., Høyer, P.: A quantum algorithm for finding the minimum. arXiv: 9607.014 (1996/1999)

Gąsieniec, L., Kowaluk, M., Lingas, A.: Faster multi-witnesses for Boolean matrix product. Inf. Process. Lett.

**109**, 242–247 (2009)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)

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)

Huang, X., Pan, V.Y.: Fast rectangular matrix multiplications and applications. J. Complex.

**14**, 257–299 (1998)Kowaluk, M., Lingas, A.: Quantum and approximation algorithms for maximum witnesses of Boolean matrix products. CoRR abs/2004.14064 (2020)

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)

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). https://doi.org/10.1007/978-3-642-35261-4_66

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)

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

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

Shapira, A., Yuster, R., Zwick, U.: All-pairs bottleneck paths in vertex weighted graphs. Algorithmica

**59**, 621–633 (2011)Vassilevska, V., Williams, R., Yuster, R.: Finding heaviest H-subgraphs in real weighted graphs, with applications. ACM Trans. Algorithms

**6**(3), 441–4423 (2010)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)

## Acknowledgments

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

## Editor information

### Editors and Affiliations

## Rights and permissions

## Copyright information

© 2021 Springer Nature Switzerland AG

## About this paper

### 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. https://doi.org/10.1007/978-3-030-67899-9_35

### Download citation

DOI: https://doi.org/10.1007/978-3-030-67899-9_35

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)