Question: We considered a proof that the expected worst case running time of the randomized quicksort algorithm is Theta(n log n). The analysis used an integral

We considered a proof that the expected worst case running time of the randomized quicksort algorithm is Theta(n log n). The analysis used an integral approximation for a summation that we have not studied in this class. There is a proof of this result that does not rely on this method. The proof is based on the following observation. With probability 1/2 the pivot selected will be between n/4 and 3/4 (i.e. a good pivot). Also with probability 1/2 the pivot selected will be between 1 and n/4 or between 3n/4 and n (i.e. a bad pivot). State a recurrence that expresses the worst case for bad pivots. State a recurrence that expresses the worst case for good pivots. State a recurrence that expresses the expected worst case by combining the first two recurrences. Prove by induction that your recurrence is in O(n log n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
