A spanning tree of a graph is the graph that contains a subset of edges and all vertices of . It is the minimum number of edges we need to make sure that the graph remains connected.

Often this subset of edges is called , which we also use to mean the overall tree that is constructed. An abuse of notation.

If each edge also carries a cost/weight specified by , then the minimum spanning tree is the spanning tree of that minimizes the total weights of all the edges chosen.

There are many algorithms for Finding the minimum spanning tree, and they run surprisingly fast (for me, at least). They utilize some properties about MSTs that allow us to claim when an edge is included, and when it’s discarded.

Cut property

Let be any connected graph, and let be a non-empty subset of . Then the following must be true:

  • There exists an edge such that and .
  • There exists a minimum weight edge that must exist in , a minimum spanning tree for .

We can prove this using an Exchange argument: given , we consider the same cut . If our tree contains the minimum weight edge , then we’re already done.

If it does not exist in , then we can exchange an edge with . This can only decrease the overall cost, because we defined to be the minimum weight edge that cross the cut. Furthermore, remains a tree because the number of edges across this cut remains one.

This implies that was never the MST for , and we have a contradiction. Therefore, the MST for must include edge .

Cycle property

Let be a connected, undirected graph that contains at least one cycle. Let be any cycle in and let edge be the heaviest weight edge in . Then, does not exist in some MST of .

We can essentially prove this with another exchange argument. Assume for contradiction that a MST of does contain the heaviest weight edge in some cycle . Then, we can exchange with some other edge that does not exist in the MST, and is part of .

  • MST remains a tree because we removed an edge and added another in the same cycle.
  • By definition, , and so the overall weight of the new MST can only decrease.

Therefore, the old MST did not have the minimum overall weight, which is a contradiction. So, cannot be part of some MST for .