0

I have homework from recursion tree and despite my search for hours I could not find the answer to this problem.

I appreciate if you can help.

Draw a recursion tree and give a tight asymptotic bound on the solution of the recurrence $T(n) = 2^{n/2}T(n/2) + 2^n$. You need not prove your answer.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514

1 Answers1

0

I don't know what a recursion tree is, but I know how to expand a formula: $$ \begin{align*} T(n) &= 2^{n/2} T(n/2) + 2^n \\ &= 2^{n/2} (2^{n/4}T(n/4) + 2^{n/2}) + 2^n \\ &= 2^{(3/4)n} T(n/4) + 2^n + 2^n \\ &= 2^{(3/4)n} (2^{n/8} T(n/8) + 2^{n/4}) + 2^n + 2^n \\ &= 2^{(7/8)n} T(n/8) + 2^n + 2^n + 2^n \\ &= \cdots \end{align*} $$ You take it from here, along the following lines:

  1. Assume that $n$ is a power of $2$. How many times do we need to apply the recurrence identity until we get to $T(1)$? (Above I applied it three times and got down to $T(n/8)$.)

  2. When we do get to $T(1)$, what are we left with? (When we get down to $T(n/8)$, we are left with $2^{(7/8)n} T(n/8) + 3\cdot 2^n$.)

  3. Suppose that $T(1) = C$. Can you come up with a formula for $T(n)$? Can you deduce a tight asymptotic bound?

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514