You get a bonus - 1 coin for daily activity. Now you have 1 coin

Minimum spanning tree by Prim algorithm online on Intellect

Used 527 times
Minimum spanning tree by Prim algorithm online

Minimum spanning tree (Prim algorithm) online calculator

Prim algorithm takes a square matrix representing a graph with weighted edges and finds the edges that form the minimum spanning tree.

You can enter values again and recalculate the solution. Symmetric values are filled automatically, but you can change them manually if needed. The calculation always starts from the first row. Used edges are highlighted in red. If the graph is disconnected, a minimum spanning tree will not be found.

Enter matrix size:

Description

  1. Enter the matrix size.
  2. Fill in the weight matrix for your graph.
  3. Click "Run Prim".
  4. Check the highlighted edges of the minimum spanning tree and the total weight.

Example calculation and graph-to-matrix conversion:

Prim algorithm online

Share:



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Your answer option for this service or noticed an error:

Prim algorithm is a greedy algorithm for finding a minimum spanning tree in a weighted undirected graph. It builds the tree step by step: starting from one vertex and adding the cheapest edge that connects the current tree to a new vertex.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply