Analysis of Quicksort (5)
PROBLEM WITH QUICKSORT
Review
Quicksort Algorithm
Partition
Analysis
Expected Case?
Rock, Paper, Scissors
Importance of Being Random
Preview
PROBABILITY THEORY
Probability
Language of Probability
Axioms of Probability
Probability Properties
Counting
Combinatorial Sample Spaces
Coin-flip Experiment
Expectation
Expected Running Time
Example
RANDOMIZED QUICKSORT
Basic Idea
Code
Expected-Case Recurrence
Good and Bad Splits
Expected Run Time
Asymptotic Bound
Wrap Up
Next:
PROBLEM WITH QUICKSORT