next up previous
Next: Up: Previous:

Analysis

Initial Sorts: O(n lg n)

Closest Pair:


\begin{displaymath}T(n) = \left\{ \begin{array}{ll}
\Theta(1) & {\rm if} \; n \...
...
2T(n/2) + \Theta(n) & {\rm if} \; n > 3
\end{array} \right. \end{displaymath}



a = 2, b = 2, f(n) =\(\Theta(n)\) = \(\Theta(n^{\lg 2})\), case 2

T(n) = \(\Theta(n \lg n)\)

Closest-Pair algorithm takes \(\Theta(n \lg n)\) time.


next up previous
Next: Up: Previous: