Question
I already solved part A and I just need help with part B
1. Matrix Multiplication The product of two n xn matrices X and Y is a third n x n matrix 2 = XY, with entries 2 - 21; = xixY
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The naive approach solves the matrix multiplication problem in O(n3) time. In order to improve the time complexity(make a smaller number of multiplications) we have Strassen Algorithm. For the matrix given below, it will

ΓΑ Β] [E F] с D G H Blo have 7 multiplications instead of 8.

The seven multiplications for the given matrix will be:

p1= A*(F-H) ----- 1

p2= (A+B)*H ----- 2

p3= (C+D)*E -----3

p4= D*(G-E) ----4

p5= (A+D)*(E+H)----5

p6= (B-D)*(G+H)----6

P7= (A-C)* (E+F)

SOLVE THE VALUES INSIDE BRACKET FIRST THEN MULTIPLY.

ΓΑ Β] [E F] с D G H Blo=  \begin{bmatrix} p5+p4-p2+p6 &\hspace3 p1+p2\\ p3+p4& p1+p5-p3-p7 \end{bmatrix}

So overall it will take 7 multiplications. The function will be called recursively to perform these 7 multiplications, to instances half the size.

The recurrence relation for performing Strassen Algorithm is:

T(n)= 7T(n/2) + O(n2),

which when solved using the Master's theorem is O(NLog7) which is approximately O(N2.8074). This time complexity O(N2.8074), is asymptotically better/faster than O(n3) because of the lesser number of multiplications.

Though it's time complexity is less, it is not used much because of the complexity in solving this(by hand), and the recursion employed in Strassen Algorithm takes extra space.

Add a comment
Know the answer?
Add Answer to:
I already solved part A and I just need help with part B 1. Matrix Multiplication...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT