Maths WorkshopMaths problems with full solutions
Exercise 1033Logic, sets and proofs › Proof techniques › InductionL1Added 3 Nov 2026

Full binary tree node count

#induction#binary tree#structural

Statement

Prove by structural induction: a full binary tree with nn internal nodes has n+1n+1 leaves.

Hint

Base case: single node. Inductive step: a tree is a root with two subtrees.

Show solutionHide solution

Solution

Structural induction. Base case: a single-node tree has 00 internal nodes and 11 leaf. 0+1=10+1=1. ✓

Inductive step. Suppose the tree has root with left subtree LL and right subtree RR. Let nL,nRn_L,n_R be internal node counts and ℓL,ℓR\ell_L,\ell_R leaf counts. By induction, ℓL=nL+1\ell_L=n_L+1, ℓR=nR+1\ell_R=n_R+1. Total internal nodes: n=nL+nR+1n=n_L+n_R+1 (including root). Total leaves: ℓ=ℓL+ℓR=nL+1+nR+1=n+1\ell=\ell_L+\ell_R=n_L+1+n_R+1=n+1.

Conclusion. A full binary tree with nn internal nodes has n+1n+1 leaves.