Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fast Sparse Matrix Multiplication

Similar presentations


Presentation on theme: "Fast Sparse Matrix Multiplication"— Presentation transcript:

1 Fast Sparse Matrix Multiplication
Raphael Yuster Haifa University (Oranim) Uri Zwick Tel Aviv University ESA 2004

2 Matrix multiplication
j i =

3 Matrix multiplication
Authors Complexity - n3 Strassen (1969) n2.81 Coppersmith, Winograd (1990) n2.38

4 Sparse Matrix Multiplication
= n - number of rows and columns m - number of non-zero elements The distribution of the non-zero elements in the matrices is arbitrary!

5 Sparse Matrix Multiplication
j k k = Each element of B is multiplied by at most n elements from A. Complexity: mn

6 Matrix multiplication
Authors Complexity Coppersmith, Winograd (1990) n2.38 - mn here m0.7n1.2+n2+o(1) Can we combine the two?

7 Comparison mn m0.7n1.2+n2 n2.38 Complexity = n r (m=nr)

8 A closer look at the naïve algorithm
= =

9 Complexity of the naïve algorithm
where Can it really be that bad?

10 Best case for naïve algorithm
Regular case:

11 Worst case for naïve algorithm

12 Worst case for naïve algorithm
=

13 Rectangular Matrix multiplication
= n p Coppersmith (1997): Complexity ≤ n1.85p0.54+n2+o(1) For p ≤ n0.29, complexity = n2+o(1) !!!

14 The combined algorithm
Fast rectangular matrix multiplication Naïve sparse matrix multiplication Assume: a1b1 ≥ a2b2 ≥ … ≥ anbn Choose: ≤ p ≤ n Compute: AB = A1B1+ A2B2 Complexity:

15 Analysis of combined algorithm
Theorem: There exists a p for which Lemma:

16 Multiplying three sparse matrices
B C Complexity of new algorithm: m0.64n1.46+n2+o(1) n - number of rows and columns m - number of non-zero elements

17 Applications Computing the square of a sparse graph
Finding short cycles (YZ’04) Other applications?

18 Open problems A faster, more sophisticated, algorithm for sparse matrix multiplication? A faster algorithm for multiplying three or more sparse matrices? An O(m1-n1+) transitive closure algorithm?


Download ppt "Fast Sparse Matrix Multiplication"

Similar presentations


Ads by Google