1. Kruskal's algorithm Start with T = {}. Consider edges in ascending order of cost. Insert edge e in T unless doing so would create a cycle.

2. Prim's algorithm Start with some root node and greedily grow a tree T from s outward. At each step, add the cheapest edge e to T that has exactly one endpoint in T.

3. Comparison Both algorithms are greedy algorithm. As graph density increases Prim algorithm is more efiicient than Kruskal, but constant factor also affect the running time To efficiently implement Kruskal partition algorithm is needed To efficiently implement Prim heap data structure is needed

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood