0% found this document useful (0 votes)
43 views2 pages

Unit-3 Assignment Solution

Uploaded by

xnf82461
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views2 pages

Unit-3 Assignment Solution

Uploaded by

xnf82461
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Unit-3 Assignment Solution

Use Strassen’s algorithm to compute the following 2 x 2 matrices product

5 1 2 3
X
8 6 1 7

Show your work..

1) Split A and B into half-sized matrices of size 1x1 as shown under;

a11 = 5
a12 = 1
a21 = 8
a22 = 6
b11 = 2
b12 = 3
b21 = 1
b22 = 7

2) Calculate the "S" matrix as under;


s1 = b12 – b22 = 3 – 7 = -4
s2 = a11 + a12 = 5 + 1 = 6
s3 = a21 + a22 = 8 + 6 = 14
s4 = b21 – b11 = 1 – 2 = -1
s5 = a11 + a22 = 5 + 6 = 11
s6 = b11 + b22 = 2 + 7 = 9
s7 = a12 – a22 = 1 – 6 = -5
s8 = b21 + b22 = 1 + 7 = 8
s9 = a11 – a21 = 5 – 8 = -3
s10 = b11 + b12 = 2 + 3 = 5

3) Calculate the "P" matrix as under;


p1 = a11 * s1 = 5 * (-4) = -20
p2 = s2 * b22 = 6 * 7 = 42
p3 = s3 * b11 = 14 * 2 = 28
p4 = a22 * s4 = 6 * (-1) = -6
p5 = s5 * s6 = 11 * 9 = 99
p6 = s7 * s8 = (-5) * 8 = -40
p7 = s9 * s10 = (-3) * 5 = -15
4) Calculate the resultant "C" matrix as under;

c11 = p5 + p4 - p2 + p6 = 99 + (-6) – 42 + (-40) = 99 - 6 - 42 – 40 = 99 – 88 = 11


c12 = p1 + p2 = (-20) + 42 = -20 + 42 = 22
c21 = p3 + p4 = 28 + (-6) = 28 – 6 = 22
c22 = p5 + p1 - p3 – p7 = 99 + (-20) – (28) - (-15) = 99 – 20 – 28 + 15 = 114 – 48 = 66

5) Required result must be as under;

11 22
c =
22 66

You might also like