If each edge has a distinct weight then there will be only one, unique minimum spanning tree. This is true in many realistic situations, such as the telecommunications company example above, where it's unlikely any two paths have exactly the same cost. This generalizes to spanning forests as well.
Proof:
- Assume the contrary, that there are two different MSTs A and B.
- Since A and B differ despite containing the same nodes, there is at least one edge that belongs to one but not the other. Among such edges, let e1 be the one with least weight; this choice is unique because the edge weights are all distinct. Without loss of generality, assume e1 is in A.
- As B is an MST, {e1} ∪ B must contain a cycle C with e1.
- As a tree, A contains no cycles, therefore C must have an edge e2 that is not in A.
- Since e1 was chosen as the unique lowest-weight edge among those belonging to exactly one of A and B, the weight of e2 must be greater than the weight of e1.
- As e1 and e2 are part of cycle C, replacing e2 with e1 in B therefore yields a spanning tree with a smaller weight.
- This contradicts the assumption that B is an MST.
Question: Can't we just skip adding e1 to B and just get the smallest edge from B, and state that e1 < e2, since all edges are unique? Thus, it implies that there is only one MST possible.