Lecture 7
John did the standard lower bound for comparison based sorting. We argued
that all comparison-based sorting algs could be represented by a decision
tree (a subtle proposition, actually) and then noted that all n! permutations
must appear at the leaves. This gave us a lower bound of ceiling(lg n!)
comparisons for ANY sorting algorithm.
Next we used an argument from Baase's text to show that at least 3/2n-3/2
comparisons were required to find the median of n elements, no matter what
algorithm was used.