CSCI2100 · Method · Chapter 14 · Graph algorithms
Prim's algorithm
3 steps of prerequisites below it
Prim’s algorithm grows a connected vertex set S by repeatedly accepting a minimum-weight frontier edge with exactly one endpoint in S, discarding stale edges whose endpoints are both inside.
Taught in
- 14.2 Weighted graph frontiers: Dijkstra and Prim · introduced
Builds on
- Binary min-heap · used in an argument or worked solution, passage 14.2
- Minimum spanning forest · used in an argument or worked solution, passage 14.2
- Safe-edge lemma · used in an argument or worked solution, passage 14.2
Used by
No later knowledge point in these notes uses it.
Everything this builds on, earliest first · 5 steps
Each step comes after its own prerequisites, so reading in this order never needs something you have not met. It is a reading order for these notes, not a diagnosis of what you know.
- Min-priority queue · 3.1
- Binary min-heap · 3.1
- Spanning forest · 14.1
- Minimum spanning forest · 14.1
- Safe-edge lemma · 14.2
Possible roots and a review route need your own answers on these points. None are recorded yet, so none are suggested.
Longest chain down to a starting point
Each step is used by the one above it, across courses where the notes link them. It ends at a point the notes define without another point.