DAA ppt-555
DAA ppt-555
PRESENTED BY –
S.ANJITHA REDDY-
227R1A0555
Introduction to Strassen's Method
b if n 2
T (n) 2
8T ( n / 2) cn if n 2
• Since the matrix multiplications are more expensive than the matrix additions we
can reformulate the equations for Cij that will have fewer multiplications and
possibly more additions.
• C11 = P+S-T+V
• C12 = R+T
• C21 = Q+S
• C22 = P+R-Q+U
• The values for P, Q, R, S, T, U and V will be computed as follows.
• Q = (A21 + A22)B11
• R = A11(B12 - B22)
• S = A22(B21 - B11)
• T = (A11 + A12)B22
T ( n) 7T(n/2) + cn 2 1
T(n/2) = 7T(n/4)+c2
T(n/4) = 7T(n/8)+c 3
sub eq 2 in eq 1
T(n) = 7(7T(n/4)+cc4
sub eq 3 in eq 4
T(n) = 7[7(7T(n/8)+cc]+ c
= T(n/8)+ c + c
= T(n/ )+ c[+
T(n/ )+ c[ let n =
k=
= T(/ )+ c[
= T(1)+ c[
= T(1)+ c[
= T(1)+ c[
= T(1)+ c[
= T(1)+ c[
= n2.81
T(n) = O (n2.81)
The number 2.81 may not seem much smaller than 3, but because
the difference is in the exponent, the impact on running time is
significant.
C11 = P+S-T+V = 26
C12 = R+T=14
C21 = Q+S = 33
C22 = P+R-Q+U = 19
Practical Applications