| • Science | • People | • Locations | • Timeline |
One example would be a cable TV company laying cable to a new neighborhood. If it is constrained to bury the cable only along certain paths, then there would be a graph representing which points are connected by those paths. Some of those paths might be more expensive, because they are longer, or require the cable to be buried deeper; these paths would be represented by edges with larger weights. A spanning tree for that graph would be a subset of those paths that has no cycles but still connects to every house. There might be several spanning trees possible. A minimum spanning tree would be one with the lowest total cost.
In case of a tie, there could be several minimum spanning trees. However, one theorem states that if each edge has a distinct weight, the minimum spanning tree is unique. This is true in many realistic situations, such as the one above, where it's unlikely any two paths have exactly the same cost. This generalizes to spanning forests as well.
The first algorithm for finding a minimum spanning tree was developed by Czech scientist Otakar Boruvka in 1926 (see Boruvka's algorithm). Its purpose was an efficient electrical coverage of Bohemia. There are now two algorithms commonly used, Prim's algorithm and Kruskal's algorithm. Both are greedy algorithms. Both run in polynomial time, so the problem of finding such trees is in P.
The fastest minimum spanning tree algorithm to date was developed by Bernard Chazelle, and based on Boruvka's. Its running time is O(m α(m,n)), where m is the number of edges, n refers to the number of vertices and α is the classical functional inverse of Ackermann function. The function α grows extremely slowly, so that for all practical purposes it may be considered a constant no greater than 4; thus Chazelle's algorithm takes very close to O(m) time.
What is the fastest possible algorithm for this problem? That is one of the oldest open questions in computer science. If the edge weights are integers with a bounded bit length, then deterministic algorithms are known with linear running time, O(m). For general weights, randomized algorithms are known that run in linear expected time. Whether there exists a deterministic algorithm with linear running time for general weights is still an open question.
A related graph is the k-minimum spanning treeIn mathematics, the K minimum spanning tree is a graph G that spanns some K of N vertices in the input set S with the minimum total length. K is less than or equal to n''. The K MST does not have to be a subgraph of the minimum spanning tree (MST). Graph (k-MST) which is the tree that spans some subset of k vertices in the graph with minimum weight.