Take Home Test 1 - W08/CS5592 TEST ONE Design and Analysis...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
W08/CS5592 TEST ONE Design and Analysis of Algorithms Feb. 27, 2008, Wednesday, 7:00-8:15pm The following are three take home problems 1 Let A and B be two n × n matrices. It is well known that direct computing the product C = AB needs θ ( n 3 ) multiplications and additions. Strassen’s algorithm can do better. The following is the algorithm: Strassen’s algorithm (A, B, n ) ; Step 1. Divide each matrix into four smaller matrices: A = A A A A 22 21 12 11 and B = B B B B 22 21 12 11 , where A ij and B ij are n /2 × n /2 matrices. Step 2. Compute the following matrices: P = ( A 11 + A 22 )( B 11 + B 22 ); Q = ( A 21 + A 22 ) B 11 ; R = A 11 ( B 12 - B 22 ); S = A 22 ( B 21 - B 11 ); T = ( A 11 + A 22 ) B 22 ; U = ( A 21 - A 11 )( B 11 + B 12 ); V = ( A 12 - A 22 )( B 21 + B 22 ); Step 3. Compute the following matrices: C 11 = P + S T + V ; C 12 = R + T ; C 21 = Q + S ; C 22 = P + R Q + U ; Step 4. Output the answer: AB = C
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This test prep was uploaded on 04/12/2008 for the course CS 592 taught by Professor Shen during the Winter '05 term at University of Missouri-Kansas City .

Page1 / 2

Take Home Test 1 - W08/CS5592 TEST ONE Design and Analysis...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online