Binary Search & Balanced Trees


Answer & solution
Answer: Every such tree has N≥2^h; the bound is attainable. (no official key was published)
Use induction on the nonnegative height h. For h=0 the tree consists of the root, so N=1=20.
For h≥1, at least one child subtree has height h−1; otherwise no root-to-leaf path could have length h. Call that subtree T and let its size be s. By the induction hypothesis, s≥2h−1. The other child subtree has size t≥s−1, because the defining balance condition bounds the size difference by one. Empty subtrees are allowed and have size zero, so this also handles h=1.
Counting the root gives
N=1+s+t ≥1+s+(s−1)=2s ≥2h.
This proves the assertion. We did not assume the two subtrees have equal height or that every level is full. Size balance is a statement about node counts, and the proof uses exactly that statement.
The bound is sharp. For h≥1, combine a minimum-size tree of height h−1, with 2h−1 nodes, and a perfect tree of height h−2, with 2h−1−1 nodes, below a new root. Their sizes differ by one and their subtrees satisfy the same condition. The total is 2h and the height is h. At h=1 the smaller subtree is empty. This construction also explains why the stronger bound 2h+1−1 would be false: a size-balanced tree need not be perfect at its last level.