Download presentation
Presentation is loading. Please wait.
1
1 Fast Sparse Matrix Multiplication Raphael Yuster Haifa University (Oranim) Uri Zwick Tel Aviv University ESA 2004
2
2 Matrix multiplication = i j
3
3 AuthorsComplexity - n3n3 Strassen (1969) n 2.81 Coppersmith, Winograd (1990) n 2.38
4
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
5 Sparse Matrix Multiplication = Each element of B is multiplied by at most n elements from A. Complexity: mn j k k
6
6 Matrix multiplication AuthorsComplexity Coppersmith, Winograd (1990) n 2.38 - mn Can we do something better? here m 0.7 n 1.2 +n 2+o(1)
7
7 Comparison r (m=n r ) n 2.38 mn m 0.7 n 1.2 +n 2 Complexity = n
8
8 A closer look at the naïve algorithm = =
9
9 Complexity of the naïve algorithm Complexity = where Can it really be that bad?
10
10 Regular case: Best case for naïve algorithm
11
11 Worst case for naïve algorithm
12
12 Worst case for naïve algorithm = 0 0
13
13 Rectangular Matrix multiplication Coppersmith (1997): Complexity ≤ n 1.85 p 0.54 +n 2+o(1) For p ≤ n 0.29, complexity = n 2+o(1) !!! = n p p n n n
14
14 The combined algorithm Assume: a 1 b 1 ≥ a 2 b 2 ≥ … ≥ a n b n Choose: 0 ≤ p ≤ n Compute: AB = A 1 B 1 + A 2 B 2 Complexity: Fast rectangular matrix multiplication Naïve sparse matrix multiplication A1A1 A2A2 B1B1 B2B2
15
15 Analysis of combined algorithm Theorem: There exists a 1≤p≤n for which Lemma:
16
16 Multiplying three sparse matrices A C B Complexity of new algorithm: m 0.64 n 1.46 +n 2+o(1) n - number of rows and columns m - number of non-zero elements
17
17 Applications Computing the square of a sparse graph Finding short cycles (YZ’04) Other applications?
18
18 Open problems A faster, more sophisticated, algorithm for sparse matrix multiplication? A faster algorithm for multiplying three or more sparse matrices? An O(m 1- n 1+ ) transitive closure algorithm?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.