next up previous
Next: Up: Previous:

Analysis


\begin{displaymath}T(n) = \left\{ \begin{array}{ll}
\Theta(1) & n = 1 \\
\Theta(n) + 2\sum_{k=1}^{n-1} T(k) & n > 1
\end{array} \right.\end{displaymath}

Want to show running time is at least exponential, so show T(n) = $\Omega(2^n)$.

By substitution method:

Show: T(n) = $\Omega(2^n)\geq c 2^n$

Assume: T(k) $\geq c 2^k$ for k < n


\begin{eqnarray*}T(n) & \geq & \Theta(n) + 2 \sum_{k=1}^{n-1} c2^k \\
& = & \T...
...^{n-1} -1) \\
& = & \Theta(n) + 2c2^n - 4c \\
& \geq & c 2^n
\end{eqnarray*}


If $4c - \Theta(n) \leq 0$, or $c \leq \Theta(n)/4$ (okay for large enough n).

Thus, $T(n) = \Omega(2^n)$; still exponential.


next up previous
Next: Up: Previous: