9. Assume that all the edge weights are distinct. Let no MST containing A contain edge (u, v). Add the edge (u, v) to T Consider a MST T containing A Since (u, v) is not in T, T (u, v) contains a cycle, and (u, v) is in the cycle. Edge (u, v) are in the opposite sides of the cut. Since any cycle must cross the cut even number of times, there exists at least one other edge (x, y) crossing the cut. Clearly, w(x, y) > w(u, v).
10. The edge (x, y) is not in A because (x, y) crosses the cut, and the cut respects A. Removing (x, y) from the cycle, breaks the cycle and hence creates a spanning tree, T’, s.t. T’ = T (u, v) – (x, y) w(T’) = w(T) + w(u, v) – w(x, y) w(T) (as w(u, v) < w(x, y)) This contradicts the fact that T is a MST.
18. For each v in Adj[u]…. can be done in E complexity Rest of the loop can be done in V 2 complexity So, overall O(V 2 ) Using heaps we can solve in O((V + E)logV)