No MST formed yet. Click "Run Kruskal's Algorithm" to see the result.
Kruskal's Algorithm is used to find the Minimum Spanning Tree (MST) of a connected, undirected graph. The MST is a subgraph that connects all vertices with the smallest total edge weight without forming any cycles.
Consider the following graph:
Sorted edges: (1-2: 1), (1-3: 2), (3-4: 2), (0-2: 3), (0-1: 4), (2-3: 4), (4-5: 6)
Steps:
Now, the MST is complete with 5 edges.
The time complexity is O(E log E) due to sorting the edges, where E is the number of edges.
Kruskal’s algorithm is useful for designing networks like telecommunication systems or transportation grids.