0

We have a function $T(n)$ defined by $T(1) =1$ and $T(n)=3T(\lfloor n/2\rfloor)+n$ for $n > 1$. We need to show that $T(2^n)=\Theta (3^n)$. How should I approach this question? Any suggestion?

xskxzr
  • 7,455
  • 5
  • 23
  • 46
CCOthers
  • 81
  • 5

1 Answers1

1

First of all, try to solve the recurrence relation using the master method.

Since $f(n) = O(n^{\log_2 3 - \epsilon})$ for some $\epsilon$, this is the first case of the master method. Therefore $$T(n) = \Theta(n^{\log_2 3})$$

If you replace $n$ by $2^n$, you will get your answer. i.e. $$T(2^n) = \Theta(2^{n\log_2 3}) = \Theta(3^n)$$

Bibek Subedi
  • 126
  • 3