Matrix Multiplication
Rasmus Pagh IT University of Copenhagen ITCS, January 10, 2012
1
Matrix Multiplication Rasmus Pagh IT University of Copenhagen - - PowerPoint PPT Presentation
Matrix Multiplication Rasmus Pagh IT University of Copenhagen ITCS, January 10, 2012 1 Matrix Multiplication Rasmus Pagh IT University of Copenhagen ITCS, January 10, 2012 2 Outline Algorithm and analysis Related work Case
1
2
3
4
. X
i
cixi =
n
X
k=1
n X
i=1
Aiks1(i) xh1(i) ! 0 @
n
X
j=1
Bkjs2(j) xh2(j) 1 A .
(AB)ij ≈ s1(i) s2(j) ch1(i)+h2(j)
5
. X
i
cixi =
n
X
k=1
n X
i=1
Aiks1(i) xh1(i) ! 0 @
n
X
j=1
Bkjs2(j) xh2(j) 1 A .
(AB)ij ≈ s1(i) s2(j) ch1(i)+h2(j)
Observation: Each coefficient ci is a sum of entries of AB with random signs
5
E[s1(i1)s1(i2)s2(j1)s2(j2)] = ⇢ 1 if i1 = i2 and j1 = j2
.
. E 2 4s1(i)s2(j)
n
X
k=1
n X
i=1
Aiks1(i) xh1(i) ! 0 @
n
X
j=1
Bkjs2(j) xh2(j) 1 A 3 5 . =
n
X
k=1
Aiks2
1(i)Aikxh1(i)s2 2(j)Bkjxh2(j)
= (AB)ijxh1(i)+h2(j)
i
cixi
6
Xi0j0 = ⇢ s1(i0)s2(j0)(AB)i0j0 if h1(i) + h2(j) = h1(i0) + h2(j0)
.
. Var @X
i0,j0
Xi0j0 1 A = X
i0,j0
Var (Xi0j0) = X
i0,j0
E[X2
i0j0]
≤ X
i0,j0
(AB)2
i0j0/b = ||AB||2 F /b
7
8
9
10
10
10
11
11
11
11
12
13
13
14
15
16
(in contrast to “algebraic” approaches leading to ω < 2.3727).
17
(in contrast to “algebraic” approaches leading to ω < 2.3727).
17
18
http://xkcd.com/651/ 18