Kruskal's Algorithm and MCST
Let be a connected graph
Let be positive for each edge thenKruskal’s Algorithm ends with MCST for
Proof
As then then is spanning
Hence acyclic by constructionSuppose is not connected then
Let be a component ofAs does not contain all vertices then
Let be inside and be outside
So contains a - path which must leaveHence there exists edge of with inside and outside
Hence and are not connected in hence is acyclicThis contradicts stopping rule in algorithm
Hence is a spanning treeThus where
Let be proposition such that exists MCST of with for
So holds as has no edgesIf holds then then
Both and have edges soThus is a MCST
Suppose and holds so
for some MCST of
Let be the next edge added by algorithm so
If is an edge of then
Let then contains - path
Hence contains cycleAs is acyclic then exists edge of not in
LetAs by construction then
where is not in
As has edges then by Relation of connectivity and edges to a tree it is a tree
Hence is acyclicThus was a possible edge to add at step and by definition then
Hence
and as has minimum cost then so does