The Theory of Computation

Bernard M.E. Moret

Addison-Wesley-Longman, 1998


Detailed Solutions

Chapter 8, Problem 24




As in the case of VC, a deceptively simple iterative algorithm actually works. The algorithm is very simple indeed: start from any cut at all -- even from the empty cut into (V,empty) if so desired. Denote the current cut by (S,V-S); as long as moving one vertex from S to V-S or from V-S to S increases the number of cut edges, carry out the move and update S appropriately. Once no more improvement can be made with the transfer of a single vertex, stop and return the current cut. This is clearly a polynomial-time algorithm -- even with a very naïve implementation, each step takes at most |V|2 time and, since we have |E| edges in all and must improve the cut by at least 1 at each step, the number of steps is bounded by |E|, so that even a naïve implementation must run in O(|E|*|V|2) time. We claim the the cut returned by this algorithm cuts as least half as many edges as the optimal cut. Denote an optimal cut by (T,V-T); let S1=S inter T, S2=S-T, S3=T-S, and S4=V-(S union T). Then we can write the approximate solution as (S1 union S2,S3 union S4) and the optimal solution as (S1 union S3,S2 union S4). Let us consider what we know about the number of edges between vertices in S and vertices in Sj, for 1 <= i # j <= 4, call it nij. By construction the approximate solution cannot be improved by moving any single vertex across the cut; thus, in particular, if we consider a vertex in S1, the number of edges connecting it to other vertices in S1 and S2 is no larger than the number of edges connecting it to vertices in S3 and S4. Summing this inequality over all vertices in S1, we get
2n11+n12 <= n13+n14
Of course, the exact same reasoning can be made about the other three subsets, so we get in all

      2n11+n12 <= n13+n14
      2n22+n12 <= n23+n24
      2n33+n34 <= n13+n23
      2n44+n34 <= n14+n24
Each of these numbers is at least 0, so we can drop the first term in each inequality and write

      n12 <= n13+n14
      n12 <= n23+n24
      n34 <= n13+n23
      n34 <= n14+n24
Combining the four inequalities yields
n12+n34 <= n13+n14+n23+n24
Note that the right-hand side is exactly the number of edges cut in the approximate solution; the left-hand side is a subset of the edges cut by the optimal solution -- we need to add in n14+n23. We write
n14+n23 <= n13+n14+n23+n24
which is obviously true (again because no number is negative) and add it to our previous inequality to yield
n12+n14+n23+n34 <= 2(n13+n14+n23+n24)
or, in shorthand
optimal <= 2*approximate
which proves the result.