claim: In any binary tree where each interior node has two children, it is the case that #leaves = #interior nodes + 1.
We did an in-class exercise to try prove this claim. Students came up with inductive proofs and a direct counting argument. Instructor proposed the following proof:
When the process finishes, each leaf has no coins, each interior node has one coin, and the root has two coins.
Since the number of coins is the same before and after this process,
Had some discussion of what constitutes a proof.
We discussed GeometricSums and the GrowableArray data structure.