Kruskal's algorithm


Definition: An algorithm for computing a minimum spanning tree. It maintains a set of partial minimum spanning trees, and repeatedly adds the shortest edge in the graph whose vertices are in different partial minimum spanning trees.

See also Prim-Jarnik algorithm.

Author: JLG


analysis and code (C), (pseudocode)

More information

Eppstein's lecture outlining and contrasting MST algorithms.

Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 19 April 2006.
HTML page formatted Wed Mar 13 12:42:46 2019.

Cite this as:
Joseph L. Ganley, "Kruskal's algorithm", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 19 April 2006. (accessed TODAY) Available from: