Lower bounds on comparison-based sorting: probabilistic lower bound.
Analyze the lower bounds on comparison-based sorting: probabilistic lower bound..
Examples
Input:"test_input_1"
Output:"output_1"
Input:"test_input_2"
Output:"output_2"
Hints
Recall that the standard lower bound for comparison-based sorting is Ω(n log n) in the worst case. How does introducing randomness affect this bound?
Consider the decision tree model for comparison-based sorting. What is the minimum height of a decision tree that can sort n elements with high probability (e.g., > 1/2)?
Prove that any comparison-based sorting algorithm must have an expected running time of Ω(n log n) even when the input is randomly ordered, by analyzing the expected number of comparisons required.
Lower bounds on comparison-based sorting: probabilistic lower bound.
Analyze the lower bounds on comparison-based sorting: probabilistic lower bound..