- Borůvka's algorithm
Borůvka's algorithm is an
algorithm for finding aminimum spanning tree in a graph for which all edge weights are distinct.It was first published in 1926 by
Otakar Borůvka as a method of constructing an efficientelectricity network forMoravia . [cite journal | last = Borůvka | first = Otakar | authorlink = Otakar Borůvka | year = 1926 | title = O jistém problému minimálním (About a certain minimal problem) | journal = Práce mor. přírodověd. spol. v Brně III | volume = 3 | pages = 37–58 | language = Czech, German summary ] [cite journal | last = Borůvka | first = Otakar | authorlink = Otakar Borůvka | year = 1926 | title = Příspěvek k řešení otázky ekonomické stavby elektrovodních sítí (Contribution to the solution of a problem of economical construction of electrical networks) | journal = Elektronický Obzor | volume = 15 | pages = 153–154 | language = Czech ] The algorithm was rediscovered by Choquet in 1938; [cite journal | last = Choquet | first = Gustave | authorlink = Gustave Choquet | year = 1938 | title = Étude de certains réseaux de routes | journal = Comptes-rendus de l’Académie des Sciences | volume = 206 | pages = 310–313 | language = French ] again by Florek, Łukasiewicz, Perkal, Steinhaus, and Zubrzycki in 1951; and again bySollin some time in the early 1960s. BecauseSollin was the only Western computer scientist in this list, this algorithm is frequently called Sollin's algorithm, especially in theparallel computing literature.The algorithm begins by examining each vertex and adding the cheapest edge from that vertex to another in the graph, without regard to already added edges, and continues joining these groupings in a like manner until a tree spanning all vertices is completed. Designating each vertex or set of connected vertices a "component", pseudocode for Borůvka's algorithm is:
*Begin with a connected graph "G" containing edges of distinct weights, and an empty set of edges "T"
*While the vertices of "G" connected by "T" are disjoint:
**Begin with an empty set of edges "E"
**For each component:
***Begin with an empty set of edges "S"
***For each vertex in the component:
****Add the cheapest edge from the vertex in the component to another vertex in a disjoint component to "S"
***Add the cheapest edge in "S" to "E"
**Add the resulting set of edges "E" to "T".
*The resulting set of edges "T" is the minimum spanning tree of "G"Borůvka's algorithm can be shown to take O(log "V") iterations of the outer loop until it terminates, and therefore to run in time O("E"log "V"), where "E" is the number of edges, and "V" is the number of vertices in "G". In
planar graph s, and more generally in families of graphs closed undergraph minor operations, it can be made to run in linear time, by removing all but the cheapest edge between each pair of components after each stage of the algorithm. [citation|last=Eppstein|first=David|authorlink=David Eppstein|contribution=Spanning trees and spanners|title=Handbook of Computational Geometry|editor1-first=J.-R.|editor1-last=Sack|editor2-first=J.|editor2-last=Urrutia|publisher=Elsevier|year=1999|pages=425–461; citation|last=Mareš|first=Martin|title=Two linear time algorithms for MST on minor closed graph classes|journal=Archivum mathematicum|volume=40|year=2004|issue=3|pages=315–320|url=http://www.emis.de/journals/AM/04-3/am1139.pdf.]Other algorithms for this problem include
Prim's algorithm (actually discovered byVojtěch Jarník ) andKruskal's algorithm . Faster algorithms can be obtained by combining Prim's algorithm with Borůvka's. A faster randomized minimum spanning tree algorithm based in part on Borůvka's algorithm due to Karger, Klein, and Tarjan runs in expected time. The best known (deterministic) minimum spanning tree algorithm byBernard Chazelle is also based in part on Borůvka's and runs in O("E" α(V)) time, where α is the inverse of theAckermann function . These randomized and deterministic algorithms combine steps of Borůvka's algorithm, reducing the number of components that remain to be connected, with steps of a different type that reduce the number of edges between pairs of components.References
Wikimedia Foundation. 2010.