Labeled Tree — Definition, Formula & Examples
A labeled tree is a tree (a connected graph with no cycles) in which every vertex is assigned a distinct label, typically the integers 1 through . Because vertices are distinguishable, two labeled trees on the same vertex set are different if they have different edge sets.
A labeled tree on vertices is a connected, acyclic graph where and . Two labeled trees and are considered distinct if and only if .
Key Formula
Where:
- = Number of distinct labeled trees on $n$ vertices
- = Number of vertices, labeled $1, 2, \ldots, n$
How It Works
The key distinction between labeled and unlabeled trees is that labels make vertices individually identifiable. Swapping the positions of two vertices in an unlabeled tree might produce the same tree, but in a labeled tree it generally produces a different one. This is why the number of labeled trees on vertices grows much faster than the number of unlabeled trees. Cayley's formula gives the exact count: there are distinct labeled trees on vertices. One standard proof of Cayley's formula uses Prüfer sequences, which establish a bijection between labeled trees on vertices and sequences of length with entries from .
Worked Example
Problem: How many distinct labeled trees exist on 4 vertices?
Apply Cayley's formula: Substitute into .
Verify by reasoning: Each labeled tree on 4 vertices corresponds to a unique Prüfer sequence of length 2 with entries from . There are such sequences, confirming the count.
Answer: There are 16 distinct labeled trees on 4 vertices.
Why It Matters
Labeled trees appear throughout combinatorics and computer science. Cayley's formula is a cornerstone result in enumerative graph theory and is tested frequently in discrete math courses. Prüfer sequences, which encode labeled trees, also have practical applications in network reliability analysis and random graph generation.
Common Mistakes
Mistake: Confusing labeled and unlabeled tree counts. For , students sometimes answer 2 (the number of unlabeled trees) instead of 16.
Correction: When vertices carry distinct labels, structurally identical trees with different label assignments count as different. Always use Cayley's formula for labeled trees.
