x

Prim's Algorithm

Prim's algorithm is also used to find a minimum spanning tree

Prims Algorithm
  1. Choose any vertex to start the minimum spanning tree.
  2. Select an arc of least weight that joins a vertex not already in the tree (If there is a choice between two arcs of equal weight, then choose either).
  3. Repeat step 2 until all the vertices are connected.
Left-click: follow link, Right-click: select node, Scroll: zoom
x