Trees and Networks - Key Proof
The fundamental relationship between vertices and edges in trees is both elegant and essential for understanding tree structure.
Every tree with vertices has exactly edges.
Proof by Induction:
We prove by strong induction on .
Base case: For , a tree with 1 vertex (isolated) has 0 edges. Indeed, . ✓
Inductive hypothesis: Assume every tree with vertices has exactly edges.
Inductive step: Let be a tree with vertices where .
Since is connected and , there exists at least one edge. Since is acyclic and connected, there exists a leaf vertex (a vertex of degree 1).
To see why a leaf exists: Since is connected with , every vertex has degree . If all vertices had degree , we could construct an infinite simple path (start anywhere, always move to an unvisited neighbor, which exists by degree ). But is finite, so this is impossible. Thus some vertex has degree exactly 1 (a leaf).
Remove the leaf and its incident edge to get .
Claim: is a tree.
- Connected: Any path in not using is still in . Any path using must enter and exit via (since is a leaf), so we can route around .
- Acyclic: Removing an edge can't create cycles.
By the inductive hypothesis, has vertices and edges.
Therefore, has vertices and edges. ✓
This completes the induction.
Alternative Proof (Direct):
We can also prove this directly by showing:
- Every connected graph with vertices has at least edges
- Every acyclic graph with vertices has at most edges
Proof of (1): Build a spanning tree by BFS. Add edges one at a time, each connecting a new vertex. This requires at least edges.
Proof of (2): If a graph with vertices and connected components is acyclic, each component is a tree. Component with vertices has edges. Total edges: .
Since trees are both connected () and acyclic, they have exactly edges.
- Adding any edge to a tree creates exactly one cycle
- A connected graph with vertices and edges is a tree
- A forest with vertices and components has edges
- The complete graph has edges, so an MST removes edges
This relationship makes trees maximally sparse connected graphs: removing any edge disconnects them, and adding any edge creates a cycle. The formula provides a quick check for tree identification. In computational complexity, many tree algorithms achieve time precisely because trees have linear edge count. The sparsity also makes trees amenable to dynamic programming: many optimization problems have recurrence relations on trees that exploit their recursive decomposition at any edge.