Various forms of Kruskal's min cost spanning tree algorithm. Kruskal 1: empty minimum spanning tree T foreach edge e in (sorted edges by cost) { if (adding edge e to T does not create a cycle) { add edge e to T } } Kruskal 2: empty minimum spanning tree T foreach edge e in (sorted edges by cost) { if (edge e = [ u, v ] has u and v in disjoint components of T) { add edge e to T } } Kruskal 3: empty minimum spanning tree T put each vertex v into their own partition foreach edge e in (sorted edges by cost) { consider edge e = [ u, v ] if u and v are in different partitions, add edge and merge the partitions if (Find(u) != Find(v)) { add edge e to T Union( u, v ) } }