Analysis

What is the recurrence? Clearly, we compute the median of the n/5 medians. Then, what's the worst case for running select on what's left?

\epsfig {file=figs07/det.ps,width=4in}

$T(n) \le T(n/5) + T(3n/4) + n$.

This is O(n) because $T(n) \le T(n/5) + T(3n/4) + n =
T(19n/20)+n$ (recursion tree).


next up previous
Up: ORDER STATISTICS Previous: Deterministic Select