Exit
Lesson 080 · Step 1 of 4Streak 00

Trees

Theorem 39

Edges of a tree

A tree with nn vertices has exactly n−1n - 1 edges.

A path is a sequence of vertices joined by edges. A graph is connected if there is a path between every two vertices. A tree is a connected graph with no cycles.

We use one fact: every tree with at least 22 vertices has a leaf, a vertex of degree 11.

  1. 01Base case: a tree with 11 vertex has 00 edges, which is 1−11 - 1.Base case
  2. 02Assume every tree with kk vertices has k−1k - 1 edges. Take a tree with k+1≥2k + 1 \ge 2 vertices.Inductive hypothesis
  3. 03It has a leaf. Remove the leaf and its one edge. What remains is a tree with kk vertices.Leaf removal
  4. 04By the hypothesis, it has k−1k - 1 edges, so the original had k=(k+1)−1k = (k + 1) - 1 edges. ■\blacksquareAdd the edge back