GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 20

Solving an exponential recurrence by normalization

Algorithms · Asymptotic Analysis & Recurrences · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q20 1 mark · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 20, GATE 2025: T(0)=1 and T(n)=2T(n−1)+n·2^n for n>0. Which asymptotic order is correct? A Θ(n²2^n); B Θ(n2^n); C Θ((log n)²2^n); D Θ(4^n).
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Approach: Divide out the homogeneous growth factor 2n so that the remaining recurrence becomes a simple cumulative sum.
Define U(n)=T(n)/2n. Dividing the recurrence by 2n gives U(n)=T(n−1)/2n−1+n=U(n−1)+n, with U(0)=1. Repeated substitution yields U(n)=1+1+2+⋯+n=1+n(n+1)/2.
Therefore T(n)=2n[1+n(n+1)/2]. The bracket is a quadratic polynomial with positive leading coefficient, so it is Θ(n²). Multiplication by 2n gives Θ(n²2n), option A.
B overlooks the accumulation of n successive normalized contributions. C grows too slowly by replacing that quadratic sum with logarithms, and D is exponentially larger than the exact solution. A master theorem for T(n/b) is not the natural tool because this recurrence decreases n by one, rather than dividing it.

Original paper, page 20 · Answer key