Kruskal's Algorithm


MST Problem:

Given a connected graph G=(V,E) and a weight d:E->R+, find a minimum spanning tree T.

Kruskal's Algorithm

  1. Set i=1 and let E0={}
  2. Select an edge ei of minimum value not in Ei-1 such that Ti=<Ei-1 cup {ei} >is acyclic and define Ei=Ei-1 cup {ei}. If no such edge exists, Let T=<Ei>and stop.
  3. Replace i by i+1. Return to Step 2.

JAVA applet demos of Kruskal's algorithm.


Java Source Files:


SEE ALSO


Last Modified: Tue May 12 18:58:03 JST 1998
Mail to: ikeda@is.tokushima-u.ac.jp