Kruskal Minimum Spanning Tree

Sort a graph's edges by weight and take each one that does not close a cycle, with union-find deciding. Reports the total weight and how many components survive.

Math & convertMstUnion-FindSpanning Tree
Kruskal Minimum Spanning Tree screenshot

Sort a graph's edges by weight and take each one that does not close a cycle, with union-find deciding. Reports the total weight, every edge considered in order, and how many components survive. MSTUNION-FINDSPANNING TREE

classic 7-edge graph a triangle two disjoint trees
Total weight
-
Vertices-
Input edges-
Edges taken-
Edges rejected-
Components-
Kruskal order — every edge considered, taken or rejected
-

More tools