1. Local Search for Minimum Spanning Trees

Consider the set of all spanning trees (not just minimum ones) of a weighted, connected, undirected

graph G = (V,E). Recall that adding an edge e to a spanning tree T creates an unique cycle, and

subsequently removing any other edge e0 6= e from this cycle gives back a different spanning tree T0.

We will say that T and T0 differ by a single edge swap (e, e0) and that they are neighbors.

(a) Show that it is possible to move from any spanning tree T to any other spanning tree T0 by

performing a series of edge-swaps, that is, by moving from neighbor to neighbor. At most how

many edge-swaps are needed?

(b) Show that if T0 is an MST, then it is possible to choose these swaps so that the costs of the

spanning trees encountered along the way are non-increasing. In other words, if the sequence of

spanning trees encountered is T = T0 ! T1 ! T2 ! Tk = T0; then cost(Ti+1) cost(Ti) for all

i < k.

(c) Consider the following local search algorithm which is given as input an undirected graph G.

Let T be any spanning tree of G

while there is an edge-swap (e, e0) which reduces cost(T):

T T + e − e0

return T

Show that this procedure always returns a minimum spanning tree. At most how many iterations

does it take?

Consider the set of all spanning trees (not just minimum ones) of a weighted, connected, undirected

graph G = (V,E). Recall that adding an edge e to a spanning tree T creates an unique cycle, and

subsequently removing any other edge e0 6= e from this cycle gives back a different spanning tree T0.

We will say that T and T0 differ by a single edge swap (e, e0) and that they are neighbors.

(a) Show that it is possible to move from any spanning tree T to any other spanning tree T0 by

performing a series of edge-swaps, that is, by moving from neighbor to neighbor. At most how

many edge-swaps are needed?

(b) Show that if T0 is an MST, then it is possible to choose these swaps so that the costs of the

spanning trees encountered along the way are non-increasing. In other words, if the sequence of

spanning trees encountered is T = T0 ! T1 ! T2 ! Tk = T0; then cost(Ti+1) cost(Ti) for all

i < k.

(c) Consider the following local search algorithm which is given as input an undirected graph G.

Let T be any spanning tree of G

while there is an edge-swap (e, e0) which reduces cost(T):

T T + e − e0

return T

Show that this procedure always returns a minimum spanning tree. At most how many iterations

does it take?

### Recently Asked Questions

- security fixed Java source code along with a PDF document describing the issues im not sure what wrong with the code ; 1. Download the source file from this

- A. List four differences between recursion and iteration. (consider: definition, termination, implementation difficulty and speed)[4 marks] B. provide a

- Why is there such a jump to diagnose which leads to so many misdiagnosing? Why, also, are so many teachers stepping in and 'diagnosing' children in their