next up previous
Next: Up: Previous:

Note

The ith term of the series (i starts at 0) is 2i T(n/2i). The series ends when we hit T(1), or \(n/2^i \;=\; 1 \;\longrightarrow\;
n \;=\; 2^i \;\longrightarrow\; i \;=\; lg n\).

T(n) = n + n + n + ... + 2lg n T(1)
= n + n + n + ... + nT(1)
= \( \sum_{i=0}^{lg n - 1} n \) + nT(1)
= nlgn + n$\Theta(1)$
= nlgn + $\Theta(n)$
= nlgn + o(nlgn)
= $\Theta(nlgn)$



Do not simplify asymptotic expressions until there is no summation in the expression.


next up previous
Next: Up: Previous: