Drawing 2026-02-02 09.25.17.excalidraw
⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠
Text Elements
V
R
S
T
X
Link to original
- Suppose that we have a tree like this with the subtree being heavier than .
- Assume Note that this can only happen during insertion (Assumption )
- Then,
- Note that before rotation, adding an extra node the entire tree was balanced
- This means and, by defn of balanced in WBT (assumption )
- Then, on add, there are two ways that the tree becomes imbalanced: (Assumption )
- Added to : and
- Added to : and
- Now, we want to prove that after a left rotation, the tree will become balanced
- We want to show
- essentially, and
- Then, we also want to prove that and are balanced ( and ) Proof:
- Assume , then by
- by
- Then key structural fact that (Assumption )
- by
- by
- …rest of proof
- by
- Then, (proving that right side of not too heavy after rotation)