## Decision trees can model comparison sorts. For a given algorithm:

- One tree for each n
- Tree paths are all possible execution traces
- What’s the longest path in a decision tree for insertion sort? For merge sort?

## What is the asymptotic height of any decision tree for sorting n elements?

## Answer: ?(n lg n) (now let’s prove it…)

Previous slide | Next slide | Back to first slide | View graphic version |