Fast sparse matrix multiplication

Let <i>A</i> and <i>B</i> two <i>n</i>×<i>n</i> matrices over a ring <i>R</i> (e.g., the reals or the integers) each containing at most <i>m</i> nonzero elements. We present a new algorithm that multiplies <i>A</i> and <i>B</i> using <i>O</i>(<i>m</i><sup>0.7</sup><i>n</i><sup>1.2</sup>+<i>n</i><sup>2+<i>o</i>(1)</sup>) algebraic operations (i.e., multiplications, additions and subtractions) over <i>R</i>. The naïve matrix multiplication algorithm, on the other hand, may need to perform Ω(<i>mn</i>) operations to accomplish the same task. For <i>m</i>≤<i>n</i><sup>1.14</sup>, the new algorithm performs an almost optimal number of only <i>n</i><sup>2+<i>o</i>(1)</sup> operations. For <i>m</i>≤<i>n</i><sup>1.68</sup>, the new algorithm is also faster than the best known matrix multiplication algorithm for dense matrices which uses <i>O</i>(<i>n</i><sup>2.38</sup>) algebraic operations. The new algorithm is obtained using a surprisingly straightforward combination of a simple combinatorial idea and existing fast <i>rectangular</i> matrix multiplication algorithms. We also obtain improved algorithms for the multiplication of more than two sparse matrices. As the known fast rectangular matrix multiplication algorithms are far from being practical, our result, at least for now, is only of theoretical value.

[1]  Piotr Sankowski,et al.  Maximum Matchings in Planar Graphs via Gaussian Elimination , 2004, ESA.

[2]  Ran Raz,et al.  On the complexity of matrix product , 2002, STOC '02.

[3]  Raphael Yuster,et al.  Detecting short directed cycles using rectangular matrix multiplication and dynamic programming , 2004, SODA '04.

[4]  Vijay V. Vazirani,et al.  Matching is as easy as matrix inversion , 1987, STOC.

[5]  Victor Y. Pan,et al.  How to Multiply Matrices Faster , 1984, Lecture Notes in Computer Science.

[6]  Uri Zwick,et al.  Improved dynamic reachability algorithms for directed graphs , 2002, The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002. Proceedings..

[7]  Francis Y. L. Chin,et al.  An O(n) algorithm for determining a near-optimal computation order of matrix chain products , 1978, CACM.

[8]  Piotr Sankowski,et al.  Maximum matchings in planar graphs via gaussian elimination , 2004, Algorithmica.

[9]  T. C. Hu,et al.  Computation of Matrix Chain Products. Part I , 1982, SIAM J. Comput..

[10]  Giri Narasimhan,et al.  Fast algorithms for constructing t-spanners and paths with stretch t , 1993, Proceedings of 1993 IEEE 34th Annual Foundations of Computer Science.

[11]  Joseph Cheriyan,et al.  Randomized Õ(M(|V|)) Algorithms for Problems in Matching Theory , 1997, SIAM J. Comput..

[12]  Don Coppersmith,et al.  Matrix multiplication via arithmetic progressions , 1987, STOC.

[13]  Edith Cohen,et al.  Size-Estimation Framework with Applications to Transitive Closure and Reachability , 1997, J. Comput. Syst. Sci..

[14]  Friedrich Eisenbrand,et al.  Detecting directed 4-cycles still faster , 2003, Inf. Process. Lett..

[15]  Fred G. Gustavson,et al.  Two Fast Algorithms for Sparse Matrices: Multiplication and Permuted Transposition , 1978, TOMS.

[16]  Uri Zwick,et al.  All pairs shortest paths using bridging sets and rectangular matrix multiplication , 2000, JACM.

[17]  Clifford Stein,et al.  Introduction to Algorithms, 2nd edition. , 2001 .

[18]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[19]  Piotr Sankowski,et al.  Maximum matchings via Gaussian elimination , 2004, 45th Annual IEEE Symposium on Foundations of Computer Science.

[20]  J. Spinrad,et al.  Between O(nm) and O(nα) , 2003, SODA '03.

[21]  Raimund Seidel,et al.  On the All-Pairs-Shortest-Path Problem in Unweighted Undirected Graphs , 1995, J. Comput. Syst. Sci..

[22]  Anthony Widjaja To Review of "Algebraic Complexity Theory by Peter Bürgisser, Michael Clausen and Amin Shokrollahi", Springer 1997 , 2006 .

[23]  Ronald L. Rivest,et al.  Introduction to Algorithms, Second Edition , 2001 .

[24]  Uri Zwick,et al.  All pairs shortest paths in undirected graphs with integer weights , 1999, 40th Annual Symposium on Foundations of Computer Science (Cat. No.99CB37039).

[25]  Michael Clausen,et al.  Algebraic complexity theory , 1997, Grundlehren der mathematischen Wissenschaften.

[26]  Svatopluk Poljak,et al.  On the complexity of the subgraph problem , 1985 .

[27]  Victor Y. Pan,et al.  Fast Rectangular Matrix Multiplication and Applications , 1998, J. Complex..

[28]  Don Coppersmith,et al.  Rectangular Matrix Multiplication Revisited , 1997, J. Complex..

[29]  V. Strassen Gaussian elimination is not optimal , 1969 .

[30]  Timothy M. Chan Dynamic Subgraph Connectivity with Geometric Applications , 2006, SIAM J. Comput..

[31]  Noga Alon,et al.  Color-coding , 1995, JACM.

[32]  Christopher Umans,et al.  A group-theoretic approach to fast matrix multiplication , 2003, 44th Annual IEEE Symposium on Foundations of Computer Science, 2003. Proceedings..

[33]  Dan Suciu,et al.  Journal of the ACM , 2006 .

[34]  Giuseppe F. Italiano,et al.  Fully dynamic transitive closure: breaking through the O(n/sup 2/) barrier , 2000, Proceedings 41st Annual Symposium on Foundations of Computer Science.

[35]  Man-Tak Shing,et al.  Computation of Matrix Chain Products. Part II , 1984, SIAM J. Comput..

[36]  Noga Alon,et al.  Finding and counting given length cycles , 1997, Algorithmica.

[37]  J. Cheriyan Randomized $\tilde{O}(M( , 1997 .

[38]  Amir Shpilka Lower Bounds for Matrix Product , 2003, SIAM J. Comput..

[39]  Vijay V. Vazirani,et al.  Maximum Matchings in General Graphs Through Randomization , 1989, J. Algorithms.