Karatsuba's recurrence for n-digit multiplication is
AT(n) = T(n/2) + Θ(n)
BT(n) = 4T(n/2) + Θ(n)
CT(n) = 2T(n/2) + Θ(n)
DT(n) = 3T(n/2) + Θ(n)
Answer & Solution
Correct answer: D. T(n) = 3T(n/2) + Θ(n)
Karatsuba reduces the product of two n-digit numbers to THREE products of (n/2)-digit numbers plus linear additions.
Hence T(n) = 3T(n/2) + Θ(n), which by master theorem gives O(n^log_2 3) ≈ O(n^1.58).
Four sub-problems would be the naive split (giving O(n²) again)
two would beat the actual O(n log n) for sorting, which Karatsuba does not do.
Keep practising Algorithms
Browse all Algorithms questions for GATE CSE, or explore more Computer Science topics.