Analysis of Algorithms Minimum Spanning Trees Uri Zwick February 2014
Find a minimum spanning tree 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15
Kruskal’s algorithm 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15
Prim’s algorithm 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15
Boruvka’s algorithm 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15
MST verification 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15
Comparison-based MST algorithms Running time Algorithm O(m log n) Kruskal (1956) O(m + n log n) Prim (1957) Boruvka (1926) O(m log (m,n)) Gabow-Galil- Spencer-Tarjan (1986) O(m (m,n)) Chazelle (2000) O(m + n) Karger-Klein-Tarjan (1995) Deterministic Rand.
Assume for simplicity that all edge weights are distinct The MST is then unique
The lightest edge in a cut is contained in the MST Cut rule S VS The lightest edge in a cut is contained in the MST
The heaviest edge on a cycle is not contained in the MST Cycle rule C The heaviest edge on a cycle is not contained in the MST
The intersection between a cut and a cycle is of even size Cuts and cycles The intersection between a cut and a cycle is of even size
Fundamental cycles Tree + non-tree edge unique cycle The removal of any tree edge on the cycle generates a new tree
The lightest edge in a cut is contained in the MST Cut rule - proof S VS w' w w < w' The lightest edge in a cut is contained in the MST