Upload
rafe-bertram-knight
View
219
Download
0
Embed Size (px)
DESCRIPTION
3
Citation preview
1
Complete this to a Pfaffian orientation (all internal faces have an odd number of clockwise arcs).
2
3
4
5
6
7
8
Announcements:
The deadline for the slides for the research proposal has been extended to Thursday Nov. 1.
9
Strassen’s Algorithm for Matrix Multiplication
c11 c12
c21 c22
a11 a12
a21 a22
b11 b12
b21 b22= *
10
d1= (a11+a22) * (b11+b22)d2= (a12-a22) * (b21+b22)d3= (a11-a21) * (b11+b12)d4= (a11+a12) * (b22)d5= (a21+a22) * (b11)
d6=(a11) * (b12-b22)d7=(a22) *(-b11+b21)
C11 = d1 + d2 –d4 + d7
C12 = d4 + d6
C21 = d5 + d7
C22 = d1 - d3 –d5 + d6
11
d1= (a11+a22) * (b11+b22)d2= (a12-a22) * (b21+b22)d3= (a11-a21) * (b11+b12)d4= (a11+a12) * (b22)d5= (a21+a22) * (b11)
d6=(a11) * (b12-b22)d7=(a22) *(-b11+b21)
7 Multiplications
C11 = d1 + d2 –d4 + d7
C12 = d4 + d6
C21 = d5 + d7
C22 = d1 - d3 –d5 + d6
12
d1= (a11+a22) * (b11+b22)d2= (a12-a22) * (b21+b22)d3= (a11-a21) * (b11+b12)d4= (a11+a12) * (b22)d5= (a21+a22) * (b11)
d6=(a11) * (b12-b22)d7=(a22) *(-b11+b21)
C11 = d1 + d2 – d4 + d7
C12 = d4 + d6
C21 = d5 + d7
C22 = d1 - d3 –d5 + d6
18 Additions or Subtractions
13
Strassen’s Algorithm for Matrix Multiplication
C11 C12
C21 C22
A11 A12
A21 A22
B11 B12
B21 B22= *
T(n) = Time to multiply two n by n matrices.T(n)= 7 T(n/2) + 18(n/2)2
Solution: T(n)= O( n k) where k= log2(7).
14
Coppersmith–Winograd algorithm: named after Don Coppersmith and Shmuel Winograd, O (n 2.376) time. Trivial algorithm: O (n 3) time.Strassen’s algorithm: O (n 2.80736) time.It might be possible to time improve the exponent further; however, the exponent must be at least 2 (because an matrix has n 2 values, and all of them have to be read at least once to calculate the exact result).
15
The Coppersmith–Winograd algorithm is frequently used as a building block in other algorithms to prove theoretical time bounds. However, unlike the Strassen algorithm, it is not used in practice because it only provides an advantage for matrices so large that they cannot be processed by modern hardware.