Chapter 4.5: Minimum Spanning Trees

Suppose we have a set of locations V={v_1, v_2,…, v_n} and we want to build a communication network on top of them. There should be a path between every pair of nodes, but other than this, we want to build as cheaply as possible. If T is the minimum cost solution to this problem, then (V,T) is a tree. There are several greedy algorithms that provide an optimal solution to this problem.

All of these algorithms produce a minimum spanning tree of G.

Assume that all edge costs are distinct. Let S be any subset of nodes that is neither empty nor equal to all of V, and let edge e=(v,w) be the minimum-cost edge with one end in S and the other in V-S. Then every minimum spanning tree contains edge e.

Assume that all edge costs are distinct. Let C be any cycle in G, and let edge e=(v,w) be the most expensive edge belonging to C. Then e does not belong to any minimum spanning tree of G.

Both Prim's and Kruskal's Algorithms run in O(mlogn) time. For Prim's, this is because it can be implemented with a priority queue, similarly to Dijkstra's Algorithm.

I'd rate this section a 7. It wasn't too difficult to read but it had a lot of information in it. I was able to follow the lectures better.