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

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].


Dan Hirschberg
Last modified: Feb 27, 2007