Lecture 18

We re-did the proof of Kruskal's algorithm by way of a concrete example. Give a particular graph G with a MST T found by Kruskal's algorithm. Assume we have our hands on some other spanning tree T^*. Show how to modify T^* in a manner which can only decrease its weight and which eventually gives a tree identical to T.

Next we talked about how to implement Kruskal's algorithm well. I described the algorithm in terms of Union/Find operations, and we counted instructions relative to this ADT. Then the class was led to "inventing" the Union/Find data structure (without efficiency improvements like union-by-rank and collapsing find).