## Prove: n-node RB tree has height h ? 2 lg(n+1)

## Claim: A subtree rooted at a node x contains at least 2bh(x) - 1 internal nodes

- Proof by induction on height h
- Base step: x has height 0 (i.e., NULL leaf node)
- What is bh(x)?
- A: 0
- So…subtree contains 2bh(x) - 1 = 20 - 1 = 0 internal nodes (TRUE)

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