23-3 Bottleneck spanning tree

A bottleneck spanning tree TT of an undirected graph GG is a spanning tree of GG whose largest edge weight is minimum over all spanning trees of GG. We say that the value of the bottleneck spanning tree is the weight of the maximum-weight edge in TT.

a. Argue that a minimum spanning tree is a bottleneck spanning tree.

Part (a) shows that finding a bottleneck spanning tree is no harder than finding a minimum spanning tree. In the remaining parts, we will show how to find a bottleneck spanning tree in linear time.

b. Give a linear-time algorithm that given a graph GG and an integer bb, determines whether the value of the bottleneck spanning tree is at most bb.

c. Use your algorithm for part (b) as a subroutine in a linear-time algorithm for the bottleneck-spanning-tree problem. (Hint:\textit{Hint:} You may want to use a subroutine that contracts sets of edges, as in the MST-REDUCE\text{MST-REDUCE} procedure described in Problem 23-2.)

a. To see that every minimum spanning tree is also a bottleneck spanning tree. Suppose that TT is a minimum spanning tree. Suppose there is some edge in it (u,v)(u, v) that has a weight that's greater than the weight of the bottleneck spanning tree. Then, let V1V_1 be the subset of vertices of VV that are reachable from uu in TT, without going though vv. Define V2V_2 symmetrically. Then, consider the cut that separates V1V_1 from V2V_2. The only edge that we could add across this cut is the one of minimum weight, so we know that there are no edge across this cut of weight less than w(u,v)w(u, v).

However, we have that there is a bottleneck spanning tree with less than that weight. This is a contradiction because a bottleneck spanning tree, since it is a spanning tree, must have an edge across this cut.

b. To do this, we first process the entire graph, and remove any edges that have weight greater than bb. If the remaining graph is connected, we can just arbitrarily select any tree in it, and it will be a bottleneck spanning tree of weight at most bb. Testing connectivity of a graph can be done in linear time by running a breadth first search and then making sure that no vertices remain white at the end.

c. Write down all of the edge weights of vertices. Use the algorithm from section 9.3 to find the median of this list of numbers in time O(E)O(E). Then, run the procedure from part b with this median value as input. Then there are two cases:

First, we could have that there is a bottleneck spanning tree with weight at most this median. Then just throw away the edges with weight more than the median, and repeat the procedure on this new graph with half the edges.

Second, we could have that there is no bottleneck spanning tree with at most that weight. Then, we should run a procedure similar to problem 23-2 to contract all of the edges that have weight at most the weight of the median. This takes time O(E)O(E) and then we are left solving the problem on a graph that now has half the edges.

Observe that both cases are O(E)O(E) and each recursion reduces the problem size into half. The solution to this recurrence is therefore linear.