Recurrence by substitution

43 Views Asked by At

question here

I do not really get how we get from $2T(2^k) + (2^{k+1})$ to $2T(2^k \log 2^k) + (2^{k+1})$

2

There are 2 best solutions below

0
On

By hypothesis, we know that $T(n)=n\log n$ for $n=2^k$ i.e., $T(2^k)=2^k\log 2^k$

So, substituting this value of $T(2^k)$ on the equation

$2T(2^k) + (2^{k+1})$

gives

$2(2^k log 2^k) + (2^{k+1})$

0
On

By the inductive hypothesis, if $n = 2^k$ then $T(n) = n\log n$ hence $T(2^k) = 2^k \log 2^k$.