Question: The algorithm from the slide mentioned above is: Zach correctly implemented Karatsuba's integer multiplication algorithm, see Module 9 , slide 8. However, his implementation of

The algorithm from the slide mentioned above is:
Zach correctly implemented Karatsuba's integer multiplication algorithm, see Module 9 , slide 8. However, his implementation of LeftShift takes time O(k2). Write down the recursive formula for the runtime T(n) of Karatsuba's algorithm, as implemented by Zach. Solve the recurrence and find the runtime of Karatsuba's algorithm in Zach's implementation. Algorithm: Karatsuba (X,Y,k) if k=1 then ZX[0]Y[0] elseXTXL+XRYTYL+YRZ1KKaratsuba(XL,YL,k/2)Z2Karatsuba(XR,YR,k/2)Z3Karatsuba(XT,YT,k/2)ZLeftShift(Z1,k)+Z2+LeftShift(Z3Z1Z2,k/2) return (Z)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
