Def: A minimum spanning tree in a network is a spanning tree of the underlying graph which has the smallest sum of weights amongst all spanning trees.
Example: Suppose that the vertices of a graph represent towns and the edges of the graph are roads between these towns. Label each edge with the distance between the towns. If, in this network, it is desired to run telephone wires along the roads so that all the towns are connected. Where should the wires be put to minimize the amount of wire needed to do this? To answer the question, we need to find a minimum spanning tree in the network.
We give two greedy algorithms for finding minimum spanning trees.
Pf: If the algorithm finishes, then T is a spanning tree (n-1 edges with no circuits in a graph with n vertices).
Suppose that S is a minimum spanning tree of G. If S is not T, let e = {x,y} be the first edge (by
weight) in T which is not in S. Since S is a tree, there is a chain C, from x to y in S. C U e is a
circuit in G, so not all of its edges can be in T. Let f be an edge in C which is not in T.
Suppose that wt f < wt e. Since the algorithm did not put f in T, f must have formed a circuit with
earlier edges in T, but these edges are all in S as is f, so S would contain a circuit ... contradiction.
Thus we have wt f >= wt e. Let S' = (S - {f}) U {e}. S' is connected and has n-1 edges, so it is a
spanning tree of G. Since wt S' <= wt S, and S was a minimal spanning tree, we must have wt f = wt
e. Thus, S' is also a minimum spanning tree having one more edge in common with T than S does.
This argument can now be repeated with S' in place of S, and so on, until we reach T, showing that T must have been a minimum spanning tree.