Induction on Tree Shapes

A structural proof for finite trees shows the claim for the smallest tree and assumes it for each child when proving it for a larger node.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Count child edges
  2. Identify the real assumption
  3. Add the induction results for all child subtrees
  4. Verify the assumption of disjoint subtrees

Count child edges

A leaf has one node and zero edges. Assembling \(k\) child trees adds one root and one edge to each child. If child \(i\) has \(n_i-1\) edges, the whole tree has \(\sum_i n_i\) edges and \(1+\sum_i n_i\) nodes.

Identify the real assumption

The formula uses disjoint child subtrees and one incoming parent edge per child root. Shared nodes break that calculation. See tree node counts and recursive grammar structure.[1]

Add the induction results for all child subtrees

For a nonempty finite tree, prove that its edge count is one less than its node count. A leaf has one node and zero edges. An internal node connects to each of its \(k\) child trees by one edge. Apply the hypothesis separately to those child trees. See counting tree nodes.

Child sizes: n1, ..., nk
Child internal edges: (n1 - 1) + ... + (nk - 1)
Add k parent edges: n1 + ... + nk
Whole-tree nodes: 1 + n1 + ... + nk

Verify the assumption of disjoint subtrees

If a node has two parents, counting child trees separately can double-count that node. The formula is a theorem for trees. The proof's decomposition gives you a way to locate the assumption that fails on a graph with shared descendants.

References

  1. Jeff Erickson, Algorithms ↩