Abstract
We consider1 the problem of predicting the nonzero structure of a product of two or more matrices. Prior knowledge of the nonzero structure can be applied to optimize memory allocation and to determine the optimal multiplication order for a chain product of sparse matrices. We adapt a recent algorithm by the author and show that the essence of the nonzero structure and hence, a near-optimal order of multiplications, can be determined in near-linear time in the number of nonzero entries, which is much smaller than the time required for the multiplications. An experimental evaluation of the algorithm demonstrates that it is practical for matrices of order 103 with 104 nonzeros (or larger). A relatively small pre-computation results in a large time saved in the computation-intensive multiplication.
Similar content being viewed by others
References
E. Cohen, “Estimating the size of the transitive closure in linear time,” in Proc. 35th IEEE Annual Symposium on Foundations of Computer Science, IEEE, 1994, pp. 190–200, full version submitted to JCSS.
E. Cohen, “Optimizing multiplications of sparse matrices,” in Proc. of the 5th International Conference on Integer Programming and Combinatorial Optimization, Lecture Notes in Computer Science, vol. 1084, W.H. Cunningham, S.T. McCormick, and M. Queyranne (Eds.), Springer-Verlag, 1996, pp. 219–233.
D. Coppersmith and S. Winograd, “Matrix multiplication via arithmetic progressions,” J. Symb. Comput., vol. 9, pp. 251–280, 1990.
T. Cormen, C. Leiserson, and R. Rivest, Introduction to Algorithms, McGraw-Hill: New York, 1990.
W. Feller, An Introduction to Probability Theory and its Applications, John Wiley & Sons: New York, 1971, vol. 2.
A. George, J. Gilbert, and J.W.H. Liu (Eds.), Graph Theory and Sparse Matrix Computation, The IMA Volumes in Mathematics and its Applications, vol. 56, Springer-Verlag, 1993.
A. George and J.W.H. Liu, Computer Solution of Large Sparse Positive Definite Systems, Prentice-Hall, 1981.
J.R. Gilbert, “Predicting structure in sparse matrix computations,” SIAM J. Matrix Anal. Appl., vol. 15, no.1, pp. 62–79, 1994.
J. Gilbert, C. Moler, and R. Schreiber, “Sparse matrices in Matlab: Design and implementation,” SIAM J. Matrix Anal. Appl., vol. 13, pp. 333–356, 1992.
J. Gilbert and E.G. NG, “Predicting structure in nonsymmetric sparse matrix factorizations,” in Graph Theory and Sparse Matrix Computation, The IMA Volumes in Mathematics and its Applications, vol. 56, A. George, J. Gilbert, and J.W.H. Liu (Eds.), Springer-Verlag, 1993, pp. 107–140.
G. Golub and C. Van Loan, Matrix Computations, The Johns Hopkins U. Press: Baltimore, MD, 1989.
A. Jennings and J.J. McKeown, Matrix Computations, 2nd edition, John Wiley & Sons: New York, 1992.
S. Pissanetzky, Sparse Matrix Technology, Academic Press: New York, 1984.
R. Sedgewick, Algorithms, Addison-Wesley: Reading, MA, 1988.
V. Strassen, “Gaussian elimination is not optimal,” Numerische Mathematik, vol. 14, no.3, pp. 345–356, 1969.
R.P. Tewarson, Sparse Matrices, Academic Press: New York, 1973.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Cohen, E. Structure Prediction and Computation of Sparse Matrix Products. Journal of Combinatorial Optimization 2, 307–332 (1998). https://doi.org/10.1023/A:1009716300509
Issue Date:
DOI: https://doi.org/10.1023/A:1009716300509