GATE Computer ScienceModerateGATE CS (PYQ pattern)

Karatsuba multiplies two n-digit numbers (n = 2^k) with 3 half-size products, recursing down to 1-digit numbers; the classical method uses n² single-digit products. What is the smallest such n for which Karatsuba uses fewer than one tenth as many single-digit multiplications as the classical method?

  1. A. 256
  2. B. 1024
  3. C. 512
  4. D. 128

Correct answer: C. 512

Karatsuba uses 3^k products versus 4^k, a ratio of (3/4)^k. (3/4)^8 = 0.1001… is just above 0.1, while (3/4)^9 = 0.0751 is below, so k = 9 and n = 512. Rounding (3/4)^8 to 0.1 gives the trap answer 256.

More Algorithms questions

Exams that ask this topic