In graph theory, the minimum spanning tree (MST) problem finds a spanning tree (i.e., of all vertices) in a graph with the minimum weight. Formally, we’re given a positive weighted connected undirected graph . We must find an MST such that:
Some algorithms that solve the MST problem:
Solution formulation
We can use a generic greedy approach to solve the MST problem, by assuming is part of an MST. We define a few terms:
- Safe edge — an edge that can be added to and bring us one step closer to the final MST.
- Cut in — a partition of into and such that and .
- Edge crossing the cut — an edge such that and .
- Light edge crossing a cut — is the minimum weight edge crossing the cut.
Then,