Question: Problem 5 . Karatsuba multiplication reduces the time complexity of multiplying two n - digit numbers to O ( nlog 2 3 ) O (

Problem 5. Karatsuba multiplication reduces the time complexity of multiplying two n- digit numbers to
O(nlog23) O(n1.585), using the recurrence:
T (n)=3T (n/2)+ O(n)
The algorithm splits the numbers as follows:
x = x110n/2+ x0, y = y110n/2+ y0
and computes three products: x0 y0, x1 y1, and (x0+ x1) cdot(y0+ y1). Two values you are multiplying
might be n/2+1 digits each, rather than n/2 digits, since the addition might have led to a carry. For
instance compute (x1+ x0)(y1+ y0) for x =53 and y =52. Notice the carry and the extra digit. So the
recurrence will be
T (n)=2T (n/2)+ T (n/2+1)+ O(n)
Prove that this issue wont affect our analysis and we still O(nlog23) complexity.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!