{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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 }} . Claim : for all n 4, T ( n ) c ( n - 3) log 2 3 - 2 an . Base case ( n = 4 , 5 , 6 , 7): We chose c precisely so that the claim holds for these values of n .
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern