Skip to content
BY-NC-ND 3.0 license Open Access Published by De Gruyter Open Access March 12, 2014

A note on the multiplication of sparse matrices

Keivan Borna EMAIL logo and Sohrab Fard
From the journal Open Computer Science

Abstract

We present a practical algorithm for multiplication of two sparse matrices. In fact if A and B are two matrices of size n with m 1 and m 2 non-zero elements respectively, then our algorithm performs O(min{m 1 n, m 2 n, m 1 m 2}) multiplications and O(k) additions where k is the number of non-zero elements in the tiny matrices that are obtained by the columns times rows matrix multiplication method. Note that in the useful case, k ≤ m 2 n. However, in Proposition 3.3 and Proposition 3.4 we obtain tight upper bounds for the complexity of additions. We also study the complexity of multiplication in a practical case where non-zero elements of A (resp. B) are distributed independently with uniform distribution among columns (resp. rows) of them and show that the expected number of multiplications is O(m 1 m 2/n). Finally a comparison of number of required multiplications in the naïve matrix multiplication, Strassen’s method and our algorithm is given.

[1] G. Strang, Introduction to Linear Algebra (Wellesley-Cambridge Press, Wellesley, USA, 2003) Search in Google Scholar

[2] V. Strassen, Gaussian elimination is not optimal, Numer. Math. 13, 354–356, 1969 http://dx.doi.org/10.1007/BF0216541110.1007/BF02165411Search in Google Scholar

[3] A. Horrowithz, J. Sahny, Fundamentals of Data Structures (Computer Science Press, New York, 1983) Search in Google Scholar

[4] D. Coppersmith, S. Winograd, Matrix multiplication via arithmetic progression, J. Symb. Comput. 9, 251–280, 1990 http://dx.doi.org/10.1016/S0747-7171(08)80013-210.1016/S0747-7171(08)80013-2Search in Google Scholar

[5] R. Yuster, U. Zwick, Fast sparse matrix multiplication, ACM T. Alg. 1, 2–13, 2005 10.1145/1077464.1077466Search in Google Scholar

[6] D. Coppersmith, Rectangular matrix multiplication revisited, J. Complexity 13, 42–49, 1997 http://dx.doi.org/10.1006/jcom.1997.043810.1006/jcom.1997.0438Search in Google Scholar

[7] Z. Tang, R. Duraiswami, N. Gummerov, Fast algorithms to compute matrix-vector products for pascal matrices, Technical Reports from UMIACS UMIACS-TR-2004-08, 2004 Search in Google Scholar

[8] A. Björck, Block bidiagonal decomposition and least square problems, Perspectives in numerical Analysis, Helsinki, May 27–29, 2008 Search in Google Scholar

Published Online: 2014-3-12
Published in Print: 2014-3-1

© 2014 Versita Warsaw

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License.

Downloaded on 29.11.2022 from frontend.live.degruyter.dgbricks.com/document/doi/10.2478/s13537-014-0201-x/html
Scroll Up Arrow