Presentation is loading. Please wait.

Presentation is loading. Please wait.

Use of Submatrices If the original matrix is n x n, the four submatrices are n/2 x n/2 each; for simplicity we assume powers of two To find the result.

Similar presentations


Presentation on theme: "Use of Submatrices If the original matrix is n x n, the four submatrices are n/2 x n/2 each; for simplicity we assume powers of two To find the result."— Presentation transcript:

1 Use of Submatrices If the original matrix is n x n, the four submatrices are n/2 x n/2 each; for simplicity we assume powers of two To find the result takes 8 multiplications and 4 additions; the complexity is (n3)

2 An Example a b e g c d f h We will only demo one level of recursion and multiply 2 x 2 matrices directly r = a e + b f

3 Example - continued s = a g + b h So the final result is t = c e + d f
u = c g + d h

4 Strassen’s Method The method just shown has the recurrence
For large n (in practice, n > 45) the greater number of additions, O(n2), is compensated for by one less multiplication, O(n3)

5 Overview of the Method This technique is not intuitive and the text develops some of the thought process that might have occurred, we only present the results here

6 Some Details

7 An Example a b e g c d f h We will only demo one level of recursion and multiply 2 x 2 matrices directly P1 = a ( g - h ) P2 = ( a + b ) h

8 Example - continued P3 = ( c + d ) e P4 = d ( e - f )
P5 = ( a + d ) ( e + h ) P6 = ( b - d ) ( f + h ) P7 = ( a - c ) ( e + g )

9 Example - continued s = P1 + P2 t = P3 + P4 r = P4 + P5 + P6 - P2
u = P1 + P5 - P3 - P7


Download ppt "Use of Submatrices If the original matrix is n x n, the four submatrices are n/2 x n/2 each; for simplicity we assume powers of two To find the result."

Similar presentations


Ads by Google