Math101learn.math101.caTrees
A precise introduction to trees, unique paths, edge counts, rooted structure, and spanning trees.
Precise definition
A tree is a connected undirected graph with no cycles. For a finite simple graph with $n$ vertices, the following are equivalent: it is a tree; it is connected with $n-1$ edges; it is acyclic with $n-1$ edges; or every two vertices have exactly one simple path between them.
Notation and mathematical language
A leaf has degree 1 (except conventions for a one-vertex rooted tree). In a rooted tree, each non-root vertex has one parent; descendants, depth, and height depend on the chosen root. A spanning tree of a connected graph contains every vertex and a subset of edges forming a tree.
Conceptual picture
Trees have just enough edges for connectivity. Removing any edge disconnects a tree, while adding any new edge between existing vertices creates exactly one cycle. The unique-path property explains why hierarchical routes and recursive decompositions are unambiguous.
Conditions and key results
The $n-1$ edge characterization assumes a finite simple undirected graph and must be paired with connectivity or acyclicity; having $n-1$ edges alone is insufficient. Rooted terminology does not turn edges into directed edges unless direction is explicitly added.
A reliable strategy
- Identify vertices and edges, then verify the graph type and number of components.
- Test connectivity with a traversal and test acyclicity or use the $n-1$ theorem with its companion condition.
- For rooted questions, mark the root before assigning parents, depths, and subtrees.
- Check degree sum $2(n-1)$ and use the unique-path property to verify conclusions.
Fully worked example
Interpretation and application
Trees model file systems, organizational hierarchies, expression parsing, decision processes, and minimum-cost network backbones. A spanning tree preserves reachability but discards redundant routes, so it also removes fault tolerance present in cycles.
Common mistakes
Verification and reasonableness
- Confirm $|E|=|V|-1$ and independently verify connectivity or acyclicity.
- Check that every claimed pair has exactly one simple path.
- Use the handshaking lemma: a tree on $n$ vertices must have total degree $2n-2$.
Practice
- How many edges does a tree with 20 vertices have?
- What happens when one edge is removed from a tree?
- Can a tree contain a cycle?
Answers and brief solutions
- $19$.
- The graph becomes disconnected.
- No; acyclicity is part of the definition.
Further deduction
Every finite tree with at least two vertices has at least two leaves. Take a longest simple path. If an endpoint had another neighbour outside the path, the path could be extended; if it had another neighbour already on the path, a cycle would result. Thus each endpoint has degree one. The argument uses both finiteness, to ensure a longest path exists, and acyclicity, to rule out a return edge. This leaf fact supports induction on trees: remove a leaf and its incident edge, prove a property for the smaller tree, then attach the leaf again and show the property is preserved.
Related topics
Explore the idea
Network explorer
Change one quantity at a time and connect what moves to Trees.
Try it yourself
Hints are part of learning. Open one whenever it makes the next step feel possible.
How many edges are in a finite tree with 14 vertices?
- For a tree, $|E|=|V|-1$.
- $14-1=13$.
End of lesson
Nice work making it this far.
Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.
