KaratsubaRecurrence

KaratsubaRecurrence - In class, we looked at a recursive...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: In class, we looked at a recursive algorithm for multiplying two natural numbers. The algorithm was discovered by A. A. Karatsuba in 1960. Here is the time bound for that algorithm. Let T ( n ) be the worst-case time for multiplying two n-bit numbers. We derived the recurrence: T ( n ) is O (1) for n 3, and T ( n ) T ( n 2 ) + T ( n 2 ) + T ( n 2 + 1) + an for n > 3. (In the above, a is a constant.) I claimed in class that T ( n ) is O ( n log 2 3 ). Here is a proof of that claim. You might first try to prove that T ( n ) cn log 2 3 (for some constant c ). Unfortunately, if you try this, you will see that the induction hypothesis is not strong enough for the induction step to work. So, to strengthen the induction hypothesis, we prove a stronger claim. (This is the same trick as described on page 85 of the textbook.) Let c = max { T ( n )+2 an ( n- 3) log 2 3 : n { 4 , 5 , 6 , 7 }} ....
View Full Document

Ask a homework question - tutors are online