Minimum Spanning Tree (Kruskal's Algorithm)

Objective

Given a connected graph, the objective of this system is to build a (any) minimum spanning tree of the graph using Kruskal's Algorithm.

Graph Color Codes

The table below, lists all the colors used in the graph, along with their interpretations.

Node/Edge Color Type
Unselected Node
Selected Node
Unselected Edge
Selected Edge
Incorrect Edge

Experiment Setup

In this system, you are provided with a connected graph. You can click on any edge to add the edge (and connecting nodes) to the sub-graph.

Minimum Spanning Tree

A minimum spanning tree is a spanning tree of a graph, which has the minimum possible total edge weight.

Note :

You can reposition edges and nodes by dragging nodes if the labels are not visible due to overlapping.

Procedure

  1. Pick a non-cycleforming edge and it should have the minimum weight among all such non-cycle forming unpicked edges, to add it to the sub-graph.
  2. Check if all nodes have been added to the sub-graph. If not, then observe that the intermediate sub-graphs can be forests and repeat step 1. Otherwise Minimum Spanning Tree is completed.

Graph
Minimum Spanning Tree