GATE Computer ScienceModerateGATE CS (PYQ pattern)

T(0) = 1 and T(n) = 2T(n − 1) + n·2ⁿ for n ≥ 1. What is T(10)?

  1. A. 56320
  2. B. 57344
  3. C. 58368
  4. D. 3060

Correct answer: B. 57344

Divide by 2ⁿ: S(n) = T(n)/2ⁿ satisfies S(n) = S(n − 1) + n, so S(n) = 1 + n(n + 1)/2. T(10) = 2¹⁰ · (1 + 55) = 1024 · 56 = 57344 (forgetting the initial 1 gives 56320).

More Discrete Mathematics questions

Exams that ask this topic