140 likes | 316 Views
Chapter 8 Maximum Flows: Additional Topics. 8.7 All-Pairs Minimum Value Cut Problem. Given an undirected network G, find minimum value cut for all pairs of nodes i and j. Denote [i, j] cut as [S ij , S ij ] (if i S ij , then j S ij ; and if i S ij , then jS ij )
E N D
8.7 All-Pairs Minimum Value Cut Problem • Given an undirected network G, find minimum value cut for all pairs of nodes i and j. Denote [i, j] cut as [Sij, Sij] (if iSij, then jSij; and if iSij, then jSij) [Sij*, Sij*] : minimum value [i, j] cut v[i, j] : value of [Sij*, Sij*]. Value of a cut: capacity of the cut, the number of arcs in the cut, the capacity of the cut divided by the number of arcs in the cut, …. Naïve implementation of all pairs min cut problem needs computations of n(n-1)/2 max flow algorithm. But, it can be reduced to (n-1) computations (Gomory-Hu cut-tree).
Lemma 8.14. Let i1, i2, … , ik be an (arbitrary) sequence of nodes. Then v[i1, ik] min{ v[i1, i2], v[i2, i3], … , v[ik-1, ik] }. Pf) Let i = i1, j = ik, and [Sij*, Sij*] be the minimum value [i, j] cut. Suppose iSij*. Consider the sequence of nodes i1, i2, … , ik in order and identify the smallest index r satisfying the property that ir and ir+1 are in different components of the cut [Sij*, Sij*]. Such r must exist. Therefore [Sij*, Sij*] is also an [ir, ir+1] cut (not necessarily min value [ir, ir+1] cut ). Hence, v[i1, ik] v [ir, ir+1] min{ v[i1, i2], v[i2, i3], … , v[ik-1, ik] }. • Special case: 3 nodes i, j, and k. At least two values of v[i, j], v[j, k], and v[k, i] must be equal. One of these values that may not be equal to the other two must be the largest. many of n(n-1)/2 cut values will be equal. (at most (n-1) different values) Use spanning tree to represent the cut values and cuts.
Thm 13.4. (Maximum Spanning Tree Optimality Conditions) (a) A spanning tree T* is a maximum spanning tree if and only if it satisfies the following cut optimality conditions: For every tree arc (i, j)T*, cij ckl for every arc (k, l) contained in the cut formed by deleting arc (i, j) from T*. (b) A spanning tree is a maximum spanning tree T* if and only if it satisfies the following path optimality conditions: For every nontree arc (k, l) of G, cij ckl for every arc (i, j) contained in the tree path in T* connecting nodes k and l.
Lemma 8.15. In the n(n-1)/2 minimum cut values between all pairs of nodes, at most (n-1) values are distinct. Pf) Construct a complete undirected graph G’ = (N, A’) with n nodes. Set the value of each arc (i, j)A’ equal to v[i, j] and associate the cut [Sij*, Sij*] with this arc. Let T* be a maximum spanning tree of G’. We shall prove that the value of every nontree arc is equal to the value of some tree arc in T*. Consider a nontree arc (k, l) of value v(k, l). Let P denote the unique path in T* between nodes k and l. T* is a maximum spanning tree, hence by Thm 13.4. (b), v[k, l] min { v(i, j): (i, j)P}. Now consider the sequence of nodes in P that starts at node k and ends at node l. Lemma 8.14 implies v[k, l] min { v(i, j): (i, j)P} Together, we have v[k, l] = min { v(i, j): (i, j)P}. • To determine the minimum cut value v[k, l], simply traverse the tree path from k to l and take the minimum value.
Can we find the tree T* by solving (n-1) minimum cut problem instead of n(n-1)/2? How can we identify the cuts in addition to the cut values? • Consider a pair k and l of nodes. Suppose that arc (i, j) is a minimum value arc in the path from node k to node l in T*. Notice that we have associated a cut [Sij*, Sij*] of value v[i, j] = v[k, l] with the arc (i, j); this cut separates nodes i and j. If [Sij*, Sij*] separates nodes k and l, it is a minimum [k, l] cut. separator tree (Gomory-Hu cut-tree) • Separator tree. An undirected spanning tree T*, with a minimum [i, j] cut [Sij*, Sij*] of value v[i, j] associated with each arc (i, j), is a separator tree if it satisfies the following property for every nontree arc (k, l): If arc (i, j) is the minimum value arc from node k to node l in T* (breaking ties in a manner to be described later), [Sij*, Sij*] separates nodes k and l. • We call a subtree of a separator tree a separator subtree.
Important Property • Lemma : Let (S) be a minimum (r, s)-cut for some node r, s V, and let v, w S. Then there exists a minimum (v, w)-cut (T) such that T S. (pf) Let (X) be a min (v, w)-cut. Assume that s X. Consider 2 cases: (1) r X (2) r V\X (1) From submodular inequality, we have u((S (V\X))) + u((S (V\X))) u((S)) + u((V\X)) Now u((S (V\X))) u((S)) since (S (V\X)) is an (r, s)-cut => u((S (V\X))) u((V\X)) = u((X)) So u((S (V\X))) is a min (v, w)-cut. Similarly for (2). S (2)r w s (1)r v X
Algorithm: Grows tree for nodes 1, 2, … , n in this sequence while satisfying the separator tree property. Tp-1: separator subtree using nodes {1, 2, … , p-1}. Connect node p to appropriate node k in {1, 2, … , p-1}. Then identify minimum value cut [Spk*, Spk*] between nodes p and k, and associate it with the arc (p, k). We set the value of the arc (p, k) equal to v[p, k]. How to locate node k? (Figure 8.15) • Associate an index, called order index, with every arc in the separator subtree. Order index ranges 1, 2, … , and it is used to break ties. • Note that in every iteration of the locate procedure, T N and T N. This fact follows from the observation that for every kT and lT, the arc (, ) is the minimum value arc in the path from node k to node l in the separator tree T and, by definition, the cut must separate node k and node l.
Procedurelocate(Tp-1, p, k); begin T := Tp-1; while T is not a singleton node do begin let (, ) be the minimum value arc in T (we break ties in favor of the arc with the smallest order index; let [S*, S*] be the cut associated with the arc (, ); let the arc (, ) partition the tree T into the subtrees T and T so that T and T; let the cut [S*, S*] partition the node set N into the subsets N and N so thatN and N; if pNthen set T := Telse set T := T; end; set k equal to the singleton node in T; end; Figure 8.15. Locate Procedure
v[i, j] i j • Ex) 1 1 5 S13*={1, 8} S23*={2, 7} S34*={1, 2, 3, 7, 8} S45*={5} S46*={6, 9} 3 6 6 5 5 3 3 4 4 4 4 7 7 2 2 6 6 (a) (b) 1 5 3 6 5 3 4 4 7 5 7 2 6 (c)
Lemma 8.16. For any node lTp-1, if (i, j) is the minimum value arc in Tp in the path from node p to node l (when we break ties in favor of the arc with the least order index), [Sij*, Sij*] separates nodes p and l. Pf) Consider two possibilities for arc (i, j). Case 1: (i, j) = (p, k). Let P denote the tree path in Tp from node k to node l. The situation (i, j) = (p, k) can occur only when arc (p, k) is the unique minimum value arc in Tp in P (because of tie breaking rule). Thus v[p, k] < v[g, h] for every arc (g, h)P. (8.17) Next consider any arc (g, h)P. We claim that both the nodes g and h must belong to the same component of the cut [Spk*, Spk*]; for otherwise, [Spk*, Spk*] will also separate nodes g and h, so v[p, k]v[g, h], contradicting (8.17). Using this argument inductively for all arcs in P, we see that all the nodes in the path P (that starts at node k and ends at node l) must belong to the same component of the cut [Spk*, Spk*]. Since the cut [Spk*, Spk*] separates nodes p and k, it also separates nodes p and l (for any lTp-1). (Note that, after deleting arc (p, k) (= arc (i, j)) from Tp, the tree is divided into 2 components and each component is in different side of the cut [Spk*, Spk*].)
(continued) Case 2: (i, j) (p, k). Examine this case using the locate procedure. The size of the tree T becomes smaller in the locate procedure. Consider the iteration when T contains both the nodes k and l, but in the next iteration the tree does not contain node l. Let P denote the path in T from node k to node l in this iteration. The arc (, ) selected by the locate procedure is in the path P. By definition, (, ) is the minimum value arc in T, with ties broken appropriately. Since T contains P, (, ) is also a minimum value arc in P. Hence (i, j) = (, ). (We break ties in the same way) 7 l [S*, S*] N N k T T p Fig. 8.17 Proving Lemma 8.16
(continued) We next show that the cut [S*, S*] separates node k and node l. See Figure 8.17. Consider the same iteration of the locate procedure considered in the preceding paragraph. We have observed previously that T N and T N. We assume that pN. The procedure implies that when pN, we set T=T, implying that kT N. Since the cut [S*, S*] separates node k from node l, it also separates node p from node l. The proof is complete. (Note that, similar to case 1, after deleting arc (i, j) from Tp, the tree is divided into 2 components and each component is in different side of the cut [Sij*, Sij*].) • Remarks in parentheses imply that, to identify a [k, l] cut, we find the minimum valued arc, say (i, j), in the path from k to l in the tree T. Then deleting arc (i, j) from T yields two trees which gives the partition of nodes for minimum [k, l] cut.
A variant of Gomory-Hu procedure can be used to identify the most violated odd set constraint for the matching problem (Ref: M. W. Padberg and M. R. Rao (1982), Odd Minimum Cut-Sets and b-Matchings, Mathematics of Operations Research 7, 67-80.) • More efficient implementation: D. Gusfield, "Very simple methods for all pairs network flow analysis," SIAM Journal on Computing 19 (1990) 143-155