Answer: A
To solve the given recurrence relation:
T(n)=2T(n−1)+n2nfor n>0,T(0)=1
We can simplify it by dividing both sides of the equation by 2n:
2nT(n)=2n2T(n−1)+2nn2n
2nT(n)=2n−1T(n−1)+n
Let us define a new sequence S(n)=2nT(n). Substituting this into the equation gives:
S(n)=S(n−1)+n
The base case is:
S(0)=20T(0)=11=1
Now, we can expand the recurrence for S(n):
S(n)=S(n−1)+n=S(n−2)+(n−1)+n=S(0)+i=1∑ni=1+2n(n+1)
Thus, the asymptotic complexity of S(n) is:
S(n)=Θ(n2)
Substituting back T(n)=2nS(n):
T(n)=2n(1+2n(n+1))=Θ(n22n)
Therefore, the correct option is A.