Boruvka's MST algorithm
BoruvkaMST
Given G = (V,E)
T = graph consisting of V with no edges
while T has < n-1 edges do
for each connected component C of T do
e = min cost edge (v,u) s.t. v in C and u not in C
T := T union {e}
Analysis
In each iteration of the while loop, must
- determine connected components (and give each vertex its component's name) --
can be done in O(m) time using depth-first search (shown next lecture)
- determine minimum cost edges --
can be done in O(m) time
by comparing cost of each edge(x,y) with best_of_component(x) and best_of_component(y)
The number of connected components will be reduced by at least
a factor of 2 in each iteration.
Therefore, there are at most lg n iterations.
Therefore, the total time can be O(m lg n).
Hybrid MST algorithm
Do Boruvka's algorithm for lglg n iterations.
This takes time O(e lglg n) and ends with at most n/2lglg n
= n/lg n components.
Then use "Prim with Fib. tree" which tales time (e + N lg N),
where N = n/lg n, and thus takes time O(e+n).
So, the total time will be O(e lglg n).
When e = o(n lg n / lglg n), this time is o(e lg n) [Boruvka]
and o(e + n lg n) [Prim].