Forest
Context: FIT1058_MOC Β· an acyclic Graph (connectivity dropped) Β· a disjoint union of trees Β· edges for components
Quick Revision
π Core
1. The Forest
- Definition β a graph with no cycles, not required connected.
- Components β each connected + acyclic βΉ a Tree; a forest is a disjoint union of trees.
2. Edge Count
- Formula β vertices, components βΉ exactly edges.
- Proof β (each tree ).
- Generalises β tree formula is .
3. Trees & Forests
- Tree β forest β a tree is a one-component forest.
- Componentwise β any cycle lives in one component.
Key identities:
βοΈ Core Decision Matrix
| Object | Connected? | Edges |
|---|---|---|
| tree | yes | |
| forest ( comps) | not required | |
| isolated vertex | β | 0 (1-vertex tree) |
| acyclic | yes (defining) | β |
When It Flips: a forest relaxes the Tree's connectivity but keeps acyclicity; Kruskal's Greedy Algorithm's partial result is always a forest, becoming a Spanning Tree once it connects up.
π Exam Execution Trace
Manual Execution Trace
Forest, 10 vertices, components 4,3,3:
| Step / State | Component | ||
|---|---|---|---|
| 0 (Init) | β | β | β |
| 1 | 4 | 3 | |
| 2 | 3 | 2 | |
| 3 | 3 | 2 |
β οΈ Common Mistakes
- π‘ Each extra component costs one fewer edge β (tree) β ; edges are exactly what would merge the trees into one.
π§ Active Recall
Define a forest and prove it has edges.
- Hint: Sum of tree edge counts.
Answer
- Short answer: Acyclic graph; each component a tree with edges βΉ .
- Why: β recovers the tree formula .
How are trees and forests related, and why is acyclicity componentwise?
- Hint: Cycles live in one component.
Answer
- Short answer: A tree is a connected forest (); a forest is acyclic iff every component is.
- Why: Connected cycle β any cycle lies entirely in one component.