Start from one graph vertex. Repeatedly add the least-weight edge joining the reached graph vertices to an unreached graph vertex. Each step grows a tree and obeys the minimum spanning tree cut property. On a finite connected graph, the result is a minimum spanning tree.
Articles by others on the same topic
Prim's algorithm is a greedy algorithm used to find the Minimum Spanning Tree (MST) of a weighted, undirected graph. A Minimum Spanning Tree is a subset of edges that connects all vertices in the graph without any cycles and with the minimum possible total edge weight. ### How Prim's Algorithm Works: 1. **Initialization**: Start with an arbitrary vertex and mark it as part of the MST.