Abstract
We use randomness to exploit the potential sparsity of the Boolean matrix product in order to speed up the computation of the product. Our new fast output-sensitive algorithm for Boolean matrix product and its witnesses is randomized and provides the Boolean product and its witnesses almost certainly. Its worst-case time performance is expressed in terms of the input size and the number of non-zero entries of the product matrix. It runs in time \(\widetilde{O}(n^2s^{\omega/2 - 1}),\) where the input matrices have size n×n, the number of non-zero entries in the product matrix is at most s, ω is the exponent of the fast matrix multiplication and \(\widetilde{O}(f(n))\) denotes O(f(n)logd n) for some constant d. By the currently best bound on ω, its running time can be also expressed as \(\widetilde{O}(n^2s^{0.188})\). Our algorithm is substantially faster than the output-sensitive column-row method for Boolean matrix product for s larger than n 1.232 and it is never slower than the fast \(\widetilde{O}(n^{\omega})\)-time algorithm for this problem.
We also present a partial derandomization of our algorithm as well as its generalization to include the Boolean product of rectangular Boolean matrices. Finally, we show several applications of our output-sensitive algorithms.
Research supported in part by the VR grant 621-2005-4085.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
References
Agrawal, M., Kayal, N., Saxena, N.: PRIMES is in P. Annals of Mathematics 160(2), 781–793 (2004)
Amossen, R.R., Pagh, R.: Faster Join-Projects and Sparse Matrix Multiplication. To appear in proc. ACM International Conference on Database Theory (ICDT 2009), St. Petersburg (March 2009)
Arlazow, V.L., Dinic, E.A., Kronrod, M.A., Faradzev, I.A.: On economical construction of the transitive closure of an oriented graph. Soviet Math. Dokl. 11, 1209–1210 (1970)
Alon, N., Naor, M.: Derandomization, Witnesses for Boolean Matrix Multiplication and Construction of Perfect hash functions. Algorithmica 16, 434–449 (1996)
Bash, J., Khanna, S., Motwani, R.: On Diameter Verification and Boolean Matrix Multiplication. Technical Report, Stanford University CS department (1995)
Broder, A.Z., Charikar, M., Frieze, A.M., Mitzenmacher, M.: Min-Wise Independent Permutations. Journal of Computer and System Sciences 60, 630–659 (2000)
Cohen, E.: Structure Prediction and Computation of Sparse Matrix Products. Journal of Combinatorial Optimization 2, 307–332 (1999)
Coppersmith, D.: Rectangular matrix multiplication revisited. Journal of Symbolic Computation 13, 42–49 (1997)
Coppersmith, D., Winograd, S.: Matrix Multiplication via Arithmetic Progressions. J. of Symbolic Computation 9, 251–280 (1990)
Czumaj, A., Kowaluk, M., Lingas, A.: Faster algorithms for finding lowest common ancestors in directed acyclic graphs. The special ICALP 2005 issue of Theoretical Computer Science 380(1-2), 37–46 (2005)
Galil, Z., Margalit, O.: Witnesses for Boolean Matrix Multiplication and Shortest Paths. Journal of Complexity, 417–426 (1993)
George, A., Gilbert, J., Liu, J.W.H. (eds.): Graph Theory and Sparse Matrix Computation. The IMA Volumes in Mathematics and its Applications, vol. 56. Springer, Heidelberg (1993)
Golub, G., Van Loan, C. (eds.): Matrix Computations. The Johns Hopkins U. Press, Baltimore (1989)
Huang, X., Pan, V.Y.: Fast rectangular matrix multiplications and applications. Journal of Complexity 14, 257–299 (1998)
Kowaluk, M., Lingas, A.: LCA queries in directed acyclic graphs. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 241–248. Springer, Heidelberg (2005)
Motwani, R., Raghavan, P.: Randomized Algorithms. Cambridge University Press, Cambridge (1995)
Munro, J.I.: Efficient determination of the transitive closure of a directed graph. Information Processing Letters 1(2), 56–58 (1971)
Rytter, W.: Fast recognition of pushdown automaton and context-free languages. Information and Control 67(1-3), 12–22 (1985)
Shapira, A., Yuster, R., Zwick, U.: All-pairs bottleneck paths in vertex weighted graphs. In: Proc. SODA 2007, pp. 978–985 (2007)
Seidel, R.: On the All-Pairs-Shortest-Path Problem. In: Proc. 24th annual ACM Symposium on Theory of Computing, pp. 745–749 (1992)
Schnorr, C.P., Subramanian, C.R.: Almost Optimal (on the average) Combinatorial Algorithms for Boolean Matrix Product Witnesses, Computing the Diameter. In: Rolim, J.D.P., Serna, M., Luby, M. (eds.) RANDOM 1998. LNCS, vol. 1518, pp. 218–231. Springer, Heidelberg (1998)
Yuster, R., Zwick, U.: Fast sparse matrix multiplication. ACM Transactions on Algorithms (TALG) 1(1), 2–13 (2004) (Preliminary version in proc. ESA 2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lingas, A. (2009). A Fast Output-Sensitive Algorithm for Boolean Matrix Multiplication. In: Fiat, A., Sanders, P. (eds) Algorithms - ESA 2009. ESA 2009. Lecture Notes in Computer Science, vol 5757. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-04128-0_37
Download citation
DOI: https://doi.org/10.1007/978-3-642-04128-0_37
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-04127-3
Online ISBN: 978-3-642-04128-0
eBook Packages: Computer ScienceComputer Science (R0)