Prim's Algorithm
Overview
Prim's Algorithm is a greedy algorithm used for finding a minimum spanning tree in a weighted, undirected graph. It progressively builds the spanning tree by selecting the cheapest available edge.
Key Steps:
- Start with an arbitrary vertex and mark it as part of the spanning tree.
- Select the smallest edge connecting a vertex in the tree to a vertex outside the tree.
- Add the selected edge and the new vertex to the tree, and repeat until all vertices are included.
For further details, check out the
Wikipedia page on Prim's Algorithm.