Home

Prim's Algorithm Calculator

Prim's algorithm takes a square matrix (representing a network with weighted arcs) and finds arcs which form a minimum spanning tree. The network must be connected for a spanning tree to exist.

Enter the matrix size [one integer]: