Minimum Cost Flow Algorithms

Size: px
Start display at page:

Download "Minimum Cost Flow Algorithms"

Transcription

1 4 Minimum Cost Flow Algorithms Assumption 4.1 In this chapter we will always use G =(V,R,,!) to denote a finite graph and l, c be real-valued functions which assign lower and upper capacities to the arcs of G, where 0 apple l(r) apple c(r) for all r 2 R. We allow the case that c(r) =+1 for some arcs r 2 R with the meaning that these arcs have unlimited capacity. We also use b: V! R to denote a function which assigns desired excesses to the vertices (cf. Definition 2.8). Finally, we let k : R! R be a function which assigns flow costs to the arcs. For a b-flow f its cost is given by k(f) := r2r k(r) f(r). We extend the cost function k to the arcs of the residual network by k(+r) :=k(r) and k( r) := k(r). If h: R(G f )! R, wedefineitscostby k(h) := k( r) h(r). r2r(g f ) Definition 4.2 (Minimum Cost Flow Problem) Given all data as in Assumption 4.1, the minimum cost flow problem is to find a b-flow f which is feasible with respect to the lower and upper capacities, i.e., l(r) apple f(r) apple c(r) for all r 2 R whose cost k(f) is minimum among all feasible b-flows. In the above definition we have somewhat neglected the situation that there might be no feasible b-flow. However, as the In-Class Exercise 2 of the first Homework shows, one can determine whether there exist such a feasible b-flow by a maximum flow computation. Thus, for the rest of the chapter we will always assume that there exists a feasible solution. Observe that we have allowed negative costs on the arcs. This together with the fact that we allow infinite capacities allows us to view the maximum flow problem as a special case of the minimum cost flow problem: we extend the graph G of the maximum flow problem by adding an arc (t, s) of infinite capacity and cost k(t, s) = 1. All other arcs have cost 0. Call the resulting graph G 0. We set b(v) =0for all v 2 V (G) =V (G 0 ) and l(r) =0for all arcs r 2 R(G 0 ). It is now easy to see

2 30 Minimum Cost Flow Algorithms that there exists a feasible (s, t)-flow f in G of value val(f) =F if and only if there exists a feasible circulation in G 0 of cost F. Recall that for computing maximum flows we augmented an (s, t)-flow along an augmenting path P by a value >0 by increasing the flow value by for all arcs r such that +r 2 P and decreasing the flow value by for all arcs r such that r 2 P. Similarly, we can augment flow along a simple cycle. Let C be a simple cycle in the residual network of a feasible b-flow f. If apple min{c f ( r) : r 2 C} we can modify f by increasing the flow value by for all arcs r such that +r 2 C and decreasing the flow value by for all arcs r such that r 2 C. This augmentation leaves all excesses of vertices unchanged. In this chapter we need the following result due to Hoffmann which can be derived easily from the Maximum-Flow-Minimum-Cut-Theorem: Corollary 4.3 Let b: V! R and G be a graph with lower and upper capacities on the arcs. Then, there exists a feasible b-flow in G with respect to l and c, if and only if c( + (S)) l( (S)) + b(t ) for all cuts (S, T ) in G. Ifl and c are integral, then the b-flow can be chosen to be integral (provided it exists at all) Optimality Conditions For the following optimality condition it turns out to be helpful to write the augmentation along a cycle C in G f as the sum of f and a circulation C. Let f be a b-flow and C be a circulation on a simple cycle C in G f with value >0. We define f + C by 8 >< f(r)+, if +r 2 C (f + C )(r) := f(r), if r 2 C (4.1) >: f(r), else. Obviously, f + C is again a b-flow in G and its cost is k(f + C )=k(f)+k( C ). Theorem 4.4 Let f and f 0 be both feasible b-flows with respect to the lower and upper capacities l and c. Then f 0 can be written as the sum of f and at most 2m circulations on cycles C 1,..., C p in G f. We have k(f 0 )=k(f)+ P p i=1 k( C i ). Proof: The function f f 0 is a (not necessarily feasible) circulation in G. This circulation induces a circulation f 0 in G f : If f 0 (r) f(r) > 0, weset f 0(+r) := f 0 (r) f(r) apple c(r) f(r) = c f (+r). If f 0 (r) f(r) < 0, we set f 0( r) := f(r) f 0 (r) apple f(r) l(r) =c f ( r). On all other arcs of G f takes the value 0. Then f 0 is a feasible circulation in G f with respect to the lower capacities l 0 0 and the upper capacities c 0 = c f. Applying the flow decomposition theorem (Theorem 2.9) yields a decomposition of f 0 into at most 2m circulations C 1,..., C p in G f, where C i is a simple cycle

3 4.1 Optimality Conditions 31 in G f. Then k(f 0 )= r2r k(r)f(r)+ r2r k(r)(f 0 (r) f(r)) = k(f)+ r2g f k( r) f 0( r) = k(f)+ r2g f = k(f)+ k( r) Ci ( r) i: r2c i p k( Ci ). i=1 This is what we wanted to prove. 2 The previous theorem gives us the known optimality condition for minimum cost flows: Theorem 4.5 (Cycle Optimality Condition for Minimum Cost Flows) Let G be as in Assumption 4.1. The b-flow f is of minimum cost if and only if the residual network G f does not contain a cycle with negative length (with respect to k). Proof: If C is a cycle of negative length in G f,wecanaugmentf along C by a positive amount as in (4.1) thereby reducing the cost by P r2c k( r) < 0. Now, assume conversely that f is a feasible b-flow such that G f does not contain anegativelengthcycle. Letf 0 be any other feasible b-flow. By Theorem 4.4 we can write f 0 as the sum of f and circulations C 1,..., C p in G f,andk(f 0 )= k(f)+ P p i=1 k( CP i ).BytheassumptionthatG f does not contain a negative length cycle, we have i r2c i k( r) 0 for all i, which implies that k(f 0 ) k(f). Thus, f is of minimum cost. 2 Theorem 4.6 If there exists a b-flow f of minimum cost, then there is also an optimum flow f 0 such that l(r) apple f 0 (r) apple (n + m)(c + B) for all r 2 R, where C = max { c(r) :r 2 R ^ c(r) < +1} and B = max { b(v) : v 2 V }. Proof: Let f be an optimum b-flow. Then, in G there can not be any negative length cycle whose arcs have all unbounded capacities (else we could reduce the flow cost arbitrarily). By the Flow Decomposition Theorem 2.9 we can decompose f into at most n + m flows on paths and circulations on cycles. We can assume that any cycle in the decomposition has negative cost, otherwise we could remove the circulation along the cycle without changing excesses and without increasing the cost of the flow. As we have argued, any cycle must contain at least one arc with finite capacity. Thus the value of any circulation in the decomposition is at most C. Consequently, for any arc r 2 R all the circulations in the decomposition contribute at most (n + m)c to the flow value f(r) of f on the arc. The sum of the flows on paths is P v2v :b(v)>0 b(v) apple nb apple (n + m)b and, thus, the flows on paths contribute at most (n + m)b to the flow value on arc r. 2 We will now derive a second helpful optimality condition. Let G =(V,R,,!) be an arbitrary graph and k : R! R be arbitrary. Given p: V! R, wecanalsodefine the reduced costs k p : R! R with respect to p by k p (r) :=k(r)+p( (r)) p(!(r)).

4 32 Minimum Cost Flow Algorithms Let P =[v 0,...,v q ] be a path from v 0 to v q. Then q 1 k p (P )= (k(v i,v i+1 )+p(v i ) p(v i+1 )) i=0 q 1 q 1 = k(v i,v i+1 )+ (p(v i ) p(v i+1 )) i=0 Thus, for any path P in G we have i=0 = k(p )+p(v 0 ) p(v q ), k(p )=k p (P )+p(!(p )) p( (P )). (4.2) In particular, if P is a cycle in G, the (P )=!(P ) and we have k(p )=k p (P ), if P is a cycle. (4.3) Afunctionp: V! R is called a potential in G if and only if we have p(!(r)) apple p( (r)) + k(r) for all r 2 R. Then, clearly p is a potential if and only if k p (r) 0 for all r 2 R. If p is a potential in G, thenbyk p (r) 0 for all r 2 R and (4.3) we have k(c) = k p (C) 0 for all cycles C in G. So, the existence of a potential implies that there is no negative length cycle. Assume conversely that G does not contain a negative length cycle. Then, we can add a new node s 0 to G which is connected to all v 2 V (G) by arcs (s 0,v) of length 0. The shortest path distances dist(s 0,v,G) from s 0 are well defined and finite (since all vertices are reachable from s 0 and there is no negative length cycle). These satisfy dist(s 0,!(r),G) apple dist(s 0, (r),g)+k(r) for all r 2 R (4.4) and thus p(v) :=dist(s 0,v,G) is a potential in G. If k is integer valued, then the potential obtained this way is also integral. We summarize our findings: Theorem 4.7 Let G be a directed graph and k : R(G)! R. Then, there exists a potential in G if and only if G does not have a negative length cycle. If k is integral, the potential (if it exists) can be chosen to be integral. 2 The above theorem gives us a nice second optimality condition for minimum cost flows: Theorem 4.8 (Reduced Cost Optimality Condition for Min. Cost Flows) Let G be as in Assumption 4.1. The b-flow f is of minimum cost if and only if there exists a potential in G f, i.e. if there exists p: V! R such that p(v) apple k( r)+p(u) for all r 2 G f, where u = ( r) and v =!( r). Proof: Directly from Theorem 4.5 and Theorem For the remainder of this chapter we will make the following assumptions: Assumption 4.9 (i) There exists a b-flow which is feasible with respect to the lower and upper capacities, in particular, we have P v2v b(v) =0. (ii) For all u, v 2 V with u 6= v there is a path from u to v which consists only of arcs of infinite capacity +1 (thus, this path also exists in any residual network G f )

5 4.2 Network Transformations 33 (iii) We have l(r) =0and k(r) 0 for all r 2 R. None of the above is a restriction on the generality of our results. We can always enforce these conditions: Condition (i) ensures that there exists a feasible solution. This condition can be checked by a maximum flow computation. Condition (ii) can be enforced by adding new arcs with high costs (By Theorem 4.6 it suffices to take (n + m)(c + B)(K + 1), wherek = max{k(r) :r 2 R}) an infinite capacities between any pair of vertices where we do not have an arc. We will handle Condition (iii) in Section 4.2 and show how we can reduce the general case to this case. 4.2 Network Transformations In this section we show how we can enforce zero lower capacities and nonnegative costs on the arcs. In order to simplify the notation in this section we will write (u, v) for an arc r from u to v although there may be several of those arcs. Let G be with capacities l, c! R(G)! R + and b: V! R with P v2v b(v) =0. Suppose that we have an arc (u, v) such that l(u, v) > 0. Wesendl(u, v) > 0 units of flow along (u, v), therebyincreasingb(u) by l(u, v) units and decreasing b(v) by l(u, v) units. More formally, we set and b 0 (u) :=b(u)+l(u, v) b 0 (v) :=b(v) l(u, v) b 0 (w) :=b(w) for w 2 V \{u, v}, l 0 (u, v) :=0 c 0 (u, v) :=c(u, v) l(u, v) l 0 (r) :=l(r) c 0 (r) :=c(r) for r 2 R \{(u, v)}. Clearly, f 0 is a feasible b 0 -flow with respect to l 0 and c 0 if and only if, f defined by ( f 0 (r)+l(r), if r =(u, v) f(r) = f 0 (r), else is a feasible b-flow with respect to l and c. The value f 0 (u, v) corresponds to the additional flow on the arc (u, v) compared to the necessary minimum value l(u, v). We have k(f) =k(f 0 )+l(u, v)c(u, v), so that the costs of the two flows differ by a constant independent from f and f 0. Repeating this transformation, we can eliminate all nonzero lower capacities. We have not even increased the size of the network. We now show the somewhat surprising fact that we can also eliminate all finite upper capacities. A minimum cost flow problem where l(r) =0and c(r) =+1 for all arcs r is also called transshipment problem. Let (u, v) be an arc such that c(u, v) < +1. Wereplaceu, v and the arc (u, v) by a subgraph as shown in Figure 4.1. The idea of the transformation is to make the capacity constraint on (u, v) the mass balance constraint for some new nodes.

6 34 Minimum Cost Flow Algorithms (k(u, v), c(u, v)) b(v) v c(u, v) x (k(u, v), 1) (0, 1) (0, 1) y c(u, v) b(v) v " c(u, v) x y " c(u, v) " c(u, v) b(v) v u b(u) (a) An arc r =(u, v) with cost k(u, v) and capacity c(u, v) < +1 u b(u) (b) The transformed network with new vertices x and y u b(u) (c) Situation for a flow in the transformed network Figure 4.1: Elimination of finite capacities b(u) u (k(u, v), c(u, v)) b(v) v b(u) + c(u, v) b(v) c(u, v) ( k(u, v), c(u, v)) u v (a) An arc (u, v) with negative cost k(u, v) < 0 (b) Result of the transformation Figure 4.2: Elimination of negative cost arcs It is straightforward to verify that for any feasible b 0 -flow in the resulting network we have f(u, x) =f(y, v) apple c(u, v). Byconstruction,alsothecostscarryover,this time without change. Repeating the transformation for all arcs with finite capacity, we obtain an equivalent instance of the transshipment problem which has at most n + m vertices and at most 3m arcs. We finally show how to eliminate negative cost arcs. We will assume that we have already enforced the condition l(r) =0for all r 2 R. Supposethatk(u, v) < 0. By Theorem 4.6 we can assume that c(u, v) < +1. The transformation is similar as for elimination of nontrivial lower capacities. We send c(u, v) units of flow along (u, v) thereby saturating (u, v), increasingb(u) by c(u, v) and decreasing b(v) by c(u, v). We replace (u, v) by the inverse arc (v, u) with cost k(v, u) := k(u, v) > 0. The transformation is illustrated in Figure The Successive Shortest Path Algorithm In this section we repeat the Successive Shortest Path Algorithm for solving the Minimum Cost Flow Problem (this algorithm should be known to you from undergraduate classes). Although the algorithm is not a polynomial time algorithm, we will use it as a building block for deriving more efficient, i.e., polynomial time algorithms in subsequent sections. Definition 4.10 (Pseudoflow) Let G be as in Assumption 4.1 and l 0. A feasible pseudoflow in G is a function f : R! R such that 0 apple f(r) apple c(r) for all r 2 R. For a pseudoflow f we define the imbalance of a node v 2 V by imbal f (v) :=excess f (v) b(v). If imbal f (v) > 0, we call v a surplus node, if imbal f (v) < 0, we call v a deficit node). A node with zero imbalance is a balanced node.

7 4.3 The Successive Shortest Path Algorithm 35 Algorithm 4.1 Successive-Shortest-Path Algorithmus Successive-Shortest-Path(G, c, b, k) Input: AdirectedgraphG =(V,R,,!) with capacities l 0, c: R! R +, desired excesses b: V! R and costs k : R! R + 1 Set f(r) :=0for all r 2 R and p(v) :=0for all v 2 V. 2 Set imbal f (v) := b(v) for all v 2 V. 3 Compute the sets of surplus and deficit nodes: S f = { v 2 V : imbal f (v) > 0 } D f = { v 2 V : imbal f (v) < 0 } 4 while S f 6=? do 5 Choose s 2 S f and t 2 D f. 6 Compute the distances d(v) =dist k p(s, v, G f ) from s to all other vertices in G f with respect to the reduced costs k p. 7 Let P be a shortest path from s to t. 8 Let :=min{ c f ( r) : r 2 P } 9 Update p := p + d 10 " := min {imbal f (s), imbal f (t), }. 11 Increase f along P by " units. 12 Update f, G f, S f and D f. 13 end while 14 return f The following lemma lays the foundations for the correctness of the Successive Shortest Path Algorithm. Lemma 4.11 Let f be a pseudoflow and s 2 V. Let G 0 v G f be obtained by removing some arcs from G f, such that in G 0 all vertices are still reachable from s. Assume that k p ( r) 0 for all r 2 G 0 and denote by d(v) :=dist k p(s, v, G 0 ) for v 2 V. Then, the following statements are true: (i) For p 0 := p + d we also have k p0 ( r) 0 for all r 2 G 0. (ii) If r is an arc in G 0 on a shortest path from s to t, then k p+d ( r) =0. Proof: (i) By assumption we have k p ( r) 0 for all r 2 G 0. In particular, G 0 does not have a negative length cycle and all distances d(v) =dist k p(s, v, G 0 ) are finite and well defined. Let r 2 G 0 with u = ( r) and v =!( r). Then d(v) apple d(u)+k p ( r) =d(u)+k( r)+p(u) p(v). Rearranging yields: k( r)+(p(u)+d(u)) (p(v)+d(v)) 0, and thus k p+d ( r) 0. (ii) If r is on a shortest path from s to t with ( r) =u and!( r) =v, then d(v) =d(u)+k p ( r) and we have k p+d ( r) =0.

8 36 Minimum Cost Flow Algorithms This completes the proof. 2 Start Lecture: Corollary 4.12 Let f be a pseudoflow which satisfies the Reduced Cost Optimality Conditions and f 0 be a pseudoflow obtained from f by sending flow from a vertex s to some other vertex t along a shortest path P in G f (with respect to the reduced costs k p ). Then, f 0 also satisfies the Reduced Cost Optimality Condition. Proof: We apply Lemma 4.11 with G 0 := G f. Lemma Let p and p 0 := p + d be as in By Assumption 4.9 (ii) all vertices are reachable from s in G f.bylemma4.11we have k p0 ( r) =0for all r 2 P.BysendingflowalongP we may add r to the residual network for some arc r. But,sincek p0 ( r) = k p0 ( r) =0,allarcsstill have nonnegative reduced costs. 2 Theorem 4.13 Assume that all data is integral. Then, the Successive Shortest Path Algorithm terminates after at most nb iterations where B = max { b(v) : v 2 V }. The pseudoflow upon termination is a minimum cost b-flow. The total running time of the algorithm is O(nB(m + n log n)). Proof: The total sum of all deficits of deficit nodes before the first iteration is at most nb. In every iteration, the deficit of at least one deficit node decreases by an integral amount, i.e., by at least 1. Thus, we have at most nb iterations until termination. In every iteration we can use Dijkstra s Algorithm to determine shortest paths in O(m + n log n) time, since the edge lengths are nonnegative. Upon termination, we have S f =?. Thus, since the sum of all b-values is 0, we also have D f =?. Hence, f must be a feasible b-flow. By Corollary 4.12, the flow satisfies the Reduced Cost Optimality Condition and, consequently, must be optimal. 2 We observe that it is, in fact, not necessary to initialize the Successive-Shortest- Path-Algorithm by the flow f 0 and the potential p 0. The number of iterations of the algorithm is then bounded by P v2v :imbal f (v)>0 imbal f (v). This will be helpful in the next sections. 4.4 The Successive Scaling Algorithm The presentation of the successive scaling algorithm in this section and the scale and shrink algorithm in the following section will be done for the transshipment problem, i.e., we will assume that l(r) =0, c(r) =+1 and k(r) > 0 for all r 2 R. Our presentation makes one more assumption about the instance of the transshipment problem to solve. We require the existence of a special node z 2 V such that b(z) =0, (v, z) 2 R with k(v, z) =0and (z,v) /2 R for all v 2 V \{z}. This assumption merely simplifies the presentation of the algorithm, since we can enforce this property by adding a new node z and the required arcs without changing anything. An instance (G, k, b) of the transshipment problem is then given by the graph G, the nonnegative costs k and the required imbalances b. The successive scaling algorithm was in fact the first polynomial time algorithm for the minimum cost flow problem. To scale an instance (G, k, b) of the transshipment problem by a factor of > 0 means the following:

9 4.4 The Successive Scaling Algorithm 37 We replace b(v) by b 0 (v) =bb(v)/ c for all v 6= z. We set b 0 (z) = P v6=z b0 (v). The latter definition ensures that P i2v b0 (v) =0so that feasibility of an instance is preserved: Lemma 4.14 Let (G, k, b) be an instance of the transshipment problem and (G, k, b 0 ) be obtained by scaling with a factor of.if(g, k, b) has an optimal solution, then (G, k, b 0 ) has an optimal solution. Proof: Since we have assumed that costs are nonnegative and costs are not affected by scaling, it suffices to show that (G, k, b 0 ) has a feasible solution. By Corollary 4.3 we must show that for every T V with (T )=? we have P v2t b0 (v) apple 0. This condition is trivial if T = V. Thus, assume that T 6= V. The special node z can not be contained in T since (v, z) 2 R for all v 2 V. Thus, b 0 (v) = v2t v2t b(v) apple v2t b(v) = b(v). Since (G, k, b) had a feasible solution, P v2t b(v) apple 0 and the claim follows. 2 The successive scaling algorithm solves an instance I =(G, k, b) of the transshipment problem by solving a series of scaled instances I L,I L 1,...,I 0. Instance I j is the instance I scaled by 2 j.observethati 0 = I. Algorithm 4.2 Successive scaling algorithm for solving the minimum cost flow problem Successive-Scaling(G, k, b) Input: AdirectedgraphG =(V,R,,!) in adjacency list representation; a nonnegative cost function k : R! R + ;requirednodeimbalancesb. 1 Let f 0 and p 0 2 Let L := blog 2 Bc, where B := Pv:b(v)>0 b(v). 3 for j = L, L 1,...,0 do 4 Let I j be the instance obtained by scaling I by 2 j. 5 Solve I j by means of the successive shortest path algorithm which is initialized by the pair (2f,p) 6 Update f to be the obtained optimal flow and p the corresponding potential in G f. 7 end for Suppose that we have a pseudoflow f and a potential p which together satisfy the reduced-cost optimality conditions. Then, we will also call p a dual solution. The reasons for this will become more clear in Section 4.5 when we study the relation to Linear Programming in greater depth. If f is additionally feasible, then f is optimum and we call (f,p) a pair of optimal primal and dual solutions. Suppose that we are given a pair (f,p) of optimal primal and dual solutions for some scaled instance I j+1 =(G, k, b j+1 ). Then, by definition (f,p) satisfy the reduced cost optimality conditions, i.e., k p ( r) 0 for all r 2 G f. Since all capacities are infinite also (2f,p) together satisfy the reduced cost optimality conditions (the residual network does not change). Hence, we can use (2f,p) as an initialization for the successive shortest path algorithm of Section 4.3 to solve I j =(G, k, b j ). The v2t

10 38 Minimum Cost Flow Algorithms number of iterations is bounded by the total imbalance of the surplus vertices, i.e., by v2v b j(v)>excess 2f (v) imbal 2f (v) = v2v b j(v)>excess 2f (v) (b j (v) excess 2f (v)) apple n 1, where the last inequality stems from the fact that excess 2f (v) = 2b j+1 (v) and 2b j+1 (v) 2{b j (v),b j (v) 1} (Recall that imbal 2f (v) decreases by an integral amount for some v with imbal 2f (v) > 0 in each iteration). Hence, the total time required to solve I j is O(nS(n, m, nk)) provided we are already given an optimal primal-dual pair for I j+1, where S(n, m, nk) is the time needed to compute shortest paths in a graph with n vertices, m arcs and arc lengths in the range {0,...,nK}. Consider the instance I L obtained by scaling with a factor of 2 L =2 blog Bc 2, where B := P v:b(v)>0 b(v). Then, all required node balances in I L are in { 1, 0, +1} such that we can start with the zero flow and corresponding optimal zero potential and apply once more the successive shortest path algorithm which will terminate after at most n 1 augmentations. The successive-scaling algorithm is displayed in Algorithm 4.2. Observe that we have to use B in the definition of L since we have assumed the existence of the special node z. Theorem 4.15 The successive scaling algorithm solves the transshipment problem in time O(n log BS(n, m, nk)), where B := P v:b(v)>0 b(v). Proof: We have already seen that the algorithm solves each instance I j in time O(nS(n, m, nk)). Since there are O(log B) instances, the claimed running time follows. The correctness of the result is a consequence of the fact that I 0 = I The Scale-and-Shrink Algorithm Although the running time of successive scaling algorithm in Section 4.4 is polynomial, it is not strongly polynomial, i.e.,thenumberofarithmeticoperationsdepends on the sizes of the numbers in the input. In this section we will present and analyze an algorithm which achieves a strongly polynomial running time. As a warmup, let us derive yet another optimality condition for minimum cost flows: Theorem 4.16 (Compl. Slackness Optimality Condition for b-flows) Let G be as in Assumption 4.1. Then, the b-flow f is of minimum cost, if and only if there exists p: V! R such that the reduced costs k p of the arcs in G satisfy the following properties: k p (r) > 0 ) f(r) =l(r) l(r) <f(r) <c(r) ) k p (r) =0 k p (r) < 0 ) f(r) =c(r). (4.5a) (4.5b) (4.5c) Proof: We show that the conditions in (4.5) are equivalent to the Reduced Cost Optimality Conditions from Theorem 4.8. To this end, assume first that p is a potential in G f,i.e.k p ( r) 0 for all r 2 G f. If k p (r) > 0, thenk p (+r) > 0 and G f can not contain the arc r, sinceitscost is k p ( r) = k p (+r) < 0. Thus, we must have f(r) =0. If l(r) <f(r) <c(r), then G f contains both arcs, +r and r. Since by assumption k p (+r) 0 and

11 4.5 The Scale-and-Shrink Algorithm 39 k p ( r) 0, wehavek p (r) =k p (+r) =0. Finally, if k p (r) < 0, theng f can not contain +r, sincek p (+r) =k p (r) < 0. Thus, f(r) =c(r). We now show the other direction. Assume that (4.5) holds. We must prove that k p ( r) 0 for all r 2 G f. If k p (r) > 0, thenk p (+r) =k p (r) > 0. By (4.5) we have f(r) =0,henceG f does not contain r. If k p (r) < 0, thenby(4.5)wehavef(r) =c(r) and G f does not contain +r. For r we have k p ( r) = k p (r) > 0. Finally, if l(r) <f(r) <c(r), then k p (r) =0and both arcs +r and r have zero reduced costs. Thus, p is a potential. 2 The presentation of the scale and shrink algorithm in this section will be done for the transshipment problem, i.e., we will assume that l(r) =0, c(r) =+1 and k(r) > 0 for all r 2 R. Our presentation requires again the existence of a special node z 2 V such that b(z) =0, (v, z) 2 R with k(v, z) =0and (z,v) /2 R for all v 2 V \{z}. As seen before, this is without loss of generality. We restate the transshipment problem as a Linear Program together with its dual, which will turn out to be extremely useful in the analysis later on: min r2r k(r)f(r) (4.6a) f(r) r2 (v) f(r) =b(v) for all v 2 V (4.6b) r2 + (v) f(r) 0 for all r 2 R (4.6c) max v2v b(v)p(v) (4.7a) p(!(r)) p( (r)) apple k(r) for all r 2 R (4.7b) The complementary slackness conditions of Linear Programming for the above pair of dual Linear Programs read as follows: f(r) > 0 ) p(!(r)) p( (r)) = k(r) (4.8a) ) p(!(r)) p( (r)) <k(r) ) f(r) =0. (4.8b) One immediately sees that Conditions (4.8) are exactly the Complementary Slackness Conditions which we have derived (in a more general setting) in Theorem We first start with an elementary property that also helps us refresh our knowledge about LP-duality in the case of the minimum cost flow problem. Lemma 4.17 Let (G, k, b) be a transshipment problem with b =0, that is b(v) =0, for all v 2 V. Then any feasible solution for the dual Linear Program (4.7) is an optimal solution. Proof: By the nonnegativity of the costs k, theflowf 0 is an optimal solution of the instance, i.e., of the Linear Program (4.6). Since the objective function value of the dual (4.7) is zero for any feasible solution, any feasible solution to (4.7) must be also optimal for the dual. 2

12 40 Minimum Cost Flow Algorithms The notion of a tight arc will be essential for the algorithm. Start Lecture: Definition 4.18 (Tight arc) An arc r 0 2 R is tight if there exists an optimal solution for the transshipment problem with f(r 0 ) > 0. Suppose that r 0 2 R is a tight arc for an instance I of the transshipment problem, where u = (r 0 ) and v =!(r 0 ). The complementary slackness optimality conditions of Theorem 4.16 tell us that k p (r 0 )=0for any optimal solution p for the dual problem. In other words, p(v) =k(r 0 )+p(u) (4.9) for any optimal dual solution. Equation (4.9) tells us that we can remove the variable p(v) from the dual Linear Program by replacing it by k(r 0 )+p(u). Letus rewrite (4.7) by marking specific spots where u and v appear: max b(u)p(u)+b(v)p(v)+ i2v \{u,v} b(i)p(i) (4.10a) p(v) p(i) apple k(i, v) for all (i, v) 2 R (4.10b) p(i) p(v) apple k(v, i) for all (v, i) 2 R (4.10c) p(j) p(i) apple k(i, j) for all (i, j) 2 R with i, j 6= v (4.10d) Using p(v) =k(r 0 )+p(u) reduces (4.10) to the following: max (b(u)+b(v))p(u)+ i2v \{u,v} b(i)p(i) (4.11a) p(u) p(i) apple k(i, v) k(u, v) for all (i, v) 2 R (4.11b) p(i) p(u) apple k(v, i) +k(u, v) for all (v, i) 2 R (4.11c) p(j) p(i) apple k(i, j) for all (i, j) 2 R with i, j 6= v (4.11d) Now, let us have a closer look at (4.11). Consider the graph G/r 0 obtained from G by contracting the arc r 0,thatis,replacingthenodesu and v by the node u and the following operations: Each arc (i, v) 2 R is replaced by an arc (i, u) with cost k(i, u) =k(i, v) k(u, v). Each arc (v, i) is replaced by an arc (u, i) with cost k(u, i) =k(v, i)+k(r 0 ). Each arc (i, j) with i, j 6= v stays and has cost k(i, j) =k(i, j). Node u has required balance b(u) =b(u)+b(v) Each node i 6= u has balance b(i) =b(i). Then (4.11) is the dual of the transshipment problem defined by (G/r 0, k, b). We call this instance (G/r 0, k, b) the instance obtained from I by contracting arc r 0 and denote it by I/r 0. Contracting an arc preserves feasibility of the problem and the existence of an optimum solution to the problem, since there is a correspondence between optimal

13 4.5 The Scale-and-Shrink Algorithm 41 solutions of the instances I and I/r 0. Observe also that contracting an arc might introduce self loops, which we can safely delete without changing anything. Since any optimal dual solution p for I has p(v) =p(u)+k(r 0 ),wecanretrievean optimal dual solution for I from an optimal dual solution for I/r 0. Lemma 4.19 Let I =(G, k, b) be an instance of the transshipment problem and r 0 be a tight arc with (r 0 )=u and!(r 0 )=v. Let p be an optimal solution for the dual of the instance I/r 0 obtained by contracting r 0. Then an optimal solution p for I is given by p(i) = p(i) for i 6= v p(v) = p(u)+k(r 0 ). Proof: Immediately from the fact that p(v) =p(u) +k(r 0 ) for any optimal dual solution of I (that is of (4.10)) and the relations between the Linear Programs (4.10) and (4.11). 2 Anoteofcaution: Lemma4.19doesnot tell us that an optimal flow for the instance I/r 0 determines an optimal flow of I. It just tells us that we can extend an optimal dual solution for I/r 0 to an optimal dual solution for I. However, we will show that given an optimal dual solution for I we can find an optimal flow by solving a maximum flow problem. Consider the situation where we are given an optimal dual solution p and we want to find an optimal flow f. Forconvenience,werecalltheconditionsthatf needs to satisfy: excess f (i) =b(i) for all i 2 V (4.12a) 0 apple f(r) apple c(r) for all r 2 R (4.12b) f(r) =0 if k p (r) > 0 (4.12c) f(r) =c(r) if k p (r) < 0. (4.12d) Let c 0 and l 0 be defined by ( c 0 0 if k p (r) > 0 (r) = c(r) otherwise ( l 0 c(r) if k p (r) < 0 (r) = 0 otherwise Then, the conditions (4.12) are equivalent to finding a flow subject to the conditions that excess f (i) =b(i) l 0 (r) apple f(r) apple c 0 (r) for all i 2 V for all r 2 R This can be achieved by the method described in In-Class Exercise 2 of the first Homework by a single maximum flow computation. Assume for the moment that we are given an oracle that helps us identify a tight arc. Then, Lemma 4.19 suggests the following method for computing a minimum cost flow for an instance I =(G, k, b). If b =0,thenthezeroflowf 0 is optimal. An optimal dual solution p can be obtained as shown in Theorem 4.7 in time O(S(n, m, nk)) by a shortest path

14 42 Minimum Cost Flow Algorithms computation. If b 6= 0, thentheremustbeatightarc. Wecalltheoracletoidentify such a tight arc r 0. Then, we continue with the instance I/r 0. Observe that I/r 0 has one node less than I. Again, if all required balances in I/r 0 are zero, then we can find an optimal primal and dual solution easily. Otherwise, we identify again a tight arc and contract it. After at most n 1 contractions we have a network with a single node and the minimum cost flow problem is trivial to solve. By Lemma 4.19 we can reverse the contractions by getting an optimal dual solution for I from an optimal dual solution for I/r 0. As already noted, we then can get an optimal flow from the dual. The algorithm just described is depicted as Algorithm 4.3 in pseudocode. Algorithm 4.3 Scale-and-Shrink algorithm for solving the minimum cost flow problem Scale-and-Shrink(G, k, b) Input: AdirectedgraphG =(V,R,,!) in adjacency list representation; a nonnegative cost function k : R! R + ;requirednodeimbalancesb. 1 Set j := 1 and I 1 =(G, k, b) 2 while b 6= 0do 3 Call Find-Tight-Arc(I j ) to find a tight arc r 0 of I j and set I j+1 := I j /r 0. 4 j := j +1 5 end while 6 Find a feasible solution p for the dual of I j. 7 while j>1 do 8 Extend p to an optimal dual solution of I j 1 9 j := j 1 10 end while 11 Find a feasible flow f of (G, k, b) such that k p (r) =0whenever f(r) > 0. What remains is to implement the oracle that determines a tight arc. To this end, we need the concept of a tree solution for the transshipment problem. Such a tree solution is a function f : R! R satisfying the mass balance constraints (4.6b) and such that there exists a tree T in G with f(r) =0for all r/2 T. Lemma 4.20 A tree T uniquely determines its tree solution (provided it exists). Proof: The proof is an easy induction on the number of vertices n in the tree. If n =1,thetreehasnoarcandtheonlypossiblesolutionisf 0. If n>1, then the tree T has a leaf, say v, which has only one arc r incident with it. In any tree solution we must have f(r) =±b(v), where the sign depends on the direction on r. We can now remove r and v from the tree and proceed inductively. 2 Lemma 4.21 If there is a feasible solution to the transshipment problem, then there is also a feasible solution which is a tree solution. If there exists an optimal solution, then there is also an optimal solution which is a tree solution. Proof: Let f be any feasible solution. If f is not a tree solution, then there is an undirected cycle W in G (i.e., a cycle where we ignore the direction of the arcs) such that each arc of W has nonzero flow. Recall that we have assumed that c(r) =+1 for all r 2 R, sowecanalways increase the flow on an arc without violating the capacity constraints. We can find ">0 such that increasing the flow on any forward arc in W and decreasing the flow on any backward arc in W yields a flow which does not violate

15 4.5 The Scale-and-Shrink Algorithm 43 the capacity constraints. Observe that this does not change the excesses in the nodes. We could also decrease the flow on any forward arc by ">0 and increase the flow on any backward arc and still obtain a feasible flow (provided ">0is small enough). Thus, if ">0 and the direction in which we increase/decrease is chosen appropriately, at least one arc will get zero flow. We obtain a new flow f 0 which is zero on at least one more arc than f. Afteratmostm steps we must arrive at the situation that the flow is a tree solution. If f is an optimal solution, then since we can decrease/increase flow along the cycle W, then it follows that W must have zero cost. Hence, the procedure given above will not increase the cost of the flow and will terminate with an optimal solution which then is also a tree solution. 2 Tree solutions play an important role in the construction of a very popular algorithm for solving the transshipment problem (respective the minimum cost flow problem). The Network Simplex Method maintains feasible tree solutions and looks for special negative cost cycles. We refer to the books [AMO93, CCPS98] for this method. We are now ready to state our algorithm for finding a tight arc which is displayed in Algorithm 4.4. Recall that to scale an instance (G, k, b) of the transshipment problem by a factor of > 0 means the following: We replace b(v) by b 0 (v) =bb(v)/ c for all v 6= z. We set b 0 (z) = P v6=z b0 (v). The latter definition ensures that P i2v b0 (v) =0so that feasibility of an instance is preserved (cf. Lemma 4.14). Algorithm 4.4 Subroutine to find a tight arc. Find-Tight-Arc(G, k, b) 1 Find a feasible tree solution f for (G, k, b) 2 Scale the instance (G, k, b) by = 1 n(n 1) max{ f(r) :r 2 R } to obtain a new instance (G, k, b 0 ) with b 0 (v) =bb(v)/ c for all v 6= z b 0 (z) = P v6=z b0 (v) 3 Find an optimal tree solution f 0 for the instance (G, k, b 0 ). 4 Find r 0 2 R such that f 0 (r 0 ) n 1. Lemma 4.22 Let r 0 2 R be any arc such that in Step 4 of the Find-Tight-Arc algorithm we have f 0 (r 0 ) n 1. Then, r 0 is a tight arc. Proof: Suppose that we solve the instance (G, k, b) by means of the successive shortest path algorithm, initializing the algorithm with ( f 0, 0 ), where (f 0, 0 ) is a pair of optimal primal and dual solutions for (G, k, b 0 ).Here,weuse f 0 to denote the flow with flow f 0 (r) on an arc r. Observe that ( f 0, 0 ) together satisfy the reduced cost optimality conditions for (G, k, b), sincetheresidualnetworkdoesnotchangeinthetransitionfrom(g, k, b 0 ) to (G, k, b). Hence, ( f 0, 0 ) are a valid initialization. The algorithm terminates with an optimal flow f and a corresponding optimal potential.

16 44 Minimum Cost Flow Algorithms Since f 0 is feasible for (G, k, b), wehaveexcess f 0(v) =b 0 (v) for all v 2 V. Thus, we get excess f 0(v) = b 0 (v) for all v. Since for v 6= z we have b 0 (v) =bb(v)/ c, it follows that excess f 0(v) 2 (b(v),b(v)]. Hence for any node v with b(v) > excess f 0(v), it follows that b(v) excess f 0(v) <. As noted in the proof of Theorem 4.13, the total value of all augmentations is bounded from above by (b(v) excess f 0(v)) < (n 1). v2v b(v)>excess f 0 (v) Hence, the value of all augmentations is strictly smaller than (n 1). Consequently, since f 0 (r 0 ) (n 1) by the assumption that f 0 (r 0 ) n 1, it follows that after all augmentations, the arc r 0 must still carry positive flow. Hence, we have found an optimal solution where r 0 has positive flow, in other words, r 0 is a tight arc. 2 Lemma 4.23 Find-Tight-Arc is able to find a tight arc. Proof: In view of Lemma 4.22 it suffices to show that there will always be an arc r 0 with f 0 (r 0 ) n 1. Moreover,itsufficestoconsiderthesituationthatb 6= 0,since Find-tight-Arc is only called in this case. Let r be an arc such that f(r) = max{ f(r 0 ):r 0 2 R }. Then = f(r) n(n 1) and f(r) > 0 since b 6= 0. We now exploit the fact that f is a tree solution. Let T be the corresponding tree. Removing r from T cuts the tree into two parts which form apartition [ Y = V of the vertex set of G. Assume without loss of generality that (r) =x,!(r) =y with x 2 and y 2 Y. Then, the total net inflow into Y must equal f(r) and the total net outflow out of must equal f(r). Thus, we have f(r) = P v2y b(v). Consider the cut (, Y ). Then,theflow P r () f 0 (r 0 ) from into Y across the cut is at least P v2y b0 (v) (since the netflow into Y must be exactly P v2y b0 (v)) that is, b 0 (v) apple f 0 (r 0 ). (4.13) v2y r () Since f 0 is a tree solution, there is one arc r 0 in + () with f 0 1 (r 0 ) Thus, this arc r 0 satisfies: f 0 (r 0 ) = n 1 n 1 1 n 1 1 n 1 1 n 1 n 1. r () f 0 (r 0 ) b 0 (v) (by (4.13)) v2y b(v) 1 v2y Y n 1 n(n 1) f(r)! b(v) Y v2y n 1 (since f(r) = v2y P r () f 0 (r 0 ). b(v)) Hence from Lemma 4.22 it follows that r 0 is a tight arc. 2

17 4.5 The Scale-and-Shrink Algorithm 45 We have shown the correctness of Scale-and-Shrink. We complete our analysis with the running time. Theorem 4.24 Algorithm Scale-and-Shrink finds an optimal solution for the transshipment problem in time O(n 2 log ns(n, m, nk)), where S(n, m, nk) is the time needed to compute shortest path distances from a node in a graph with n vertices, m arcs and nonnegative integer lengths in {0,...,nK}. For instance, using Dijkstra s Algorithm gives S(n, m, nk) 2O(m + n log n). Proof: We first analyze the running time of the Find-Tight-Arc routine which is called at most n times by the algorithm. The first time Find-Tight-Arc is called, we compute a feasible tree solution as follows: We compute a feasible flow by one maximum flow computation. This can be accomplished in O(n 3 ) time by the FIFO-preflow-push algorithm of Section We then convert the solution into a tree solution as in the proof of Lemma This needs time O(nm). In all subsequent calls to Find-Tight-Arc we are faced with the situation that we already have a tree solution f for I, butneedatreesolutionfori/r 0. If r 0 is not in the tree, then f is clearly again a feasible tree solution for I/r 0. Otherwise, the contraction of r 0 causes a cycle W in the flow pattern of f. However, by sending flow along W (as in the proof of Lemma 4.21) we can reduce the flow on at least one arc of W to zero. This procedure needs O(n 2 ) time. We conclude that finding a feasible tree solution needs a total of O(n 3 ) time for all calls to Find-Tight-Arc. The only other major effort in Find-Tight-Arc is to solve the transshipment instance (G, k, b 0 ) in Step 3. We can use the successive scaling algorithm of Section 4.4 for this purpose. Its running time on (G, k, b 0 ) is O(n log BS(n, m, nk)), where B := P v:b 0 (v)>0 b0 (v). We bound b 0 (v) for all v with b 0 (v) > 0 in an appropriate way. First consider anodev 6= z. Since f is a tree solution, there are at most n 1 arcs where f is nonzero. In particular, at most n 1 arcs (j, v) can have nonzero flow. Since b(v) apple P j:(j,v)2r f(j, v), weconcludethatthereisanarc(j 0,v) with f(j 0,v) b(v)/(n 1). Hencethescalingparameter satisfies b 0 (v) apple b(v) = n(n 1) 2. b(v) n(n 1) 2 b(v) n(n 1) 2 and The special node z has required balance b 0 (z) apple n 1. Hence, B = P v:b 0 (v)>0 b0 (v) apple n n(n 1) 2 = O(n 4 ). This yields O(n log BS(n, m, nk)) = O(n log ns(n, m, nk)) for solving the instance (G, k, b 0 ). In summary, the running time for a single call to the procedure Find-Tight-Arc is in O(n log ns(n, m, nk)) and there will be an additional effort of O(n 3 ) for the first call. These running times dominate all other steps in the main part of the algorithm. Since Find-Tight-Arc is called n times, the claimed running time follows. 2

The Budget-Constrained Maximum Flow Problem

The Budget-Constrained Maximum Flow Problem 9 The Budget-Constrained Maximum Flow Problem In this chapter we consider the following problem which is called the constrained maximum flow problem ( Cmfp) [AO95]: We are given a budget B and we seek

More information

The min cost flow problem Course notes for Optimization Spring 2007

The min cost flow problem Course notes for Optimization Spring 2007 The min cost flow problem Course notes for Optimization Spring 2007 Peter Bro Miltersen February 7, 2007 Version 3.0 1 Definition of the min cost flow problem We shall consider a generalization of the

More information

Week 4. (1) 0 f ij u ij.

Week 4. (1) 0 f ij u ij. Week 4 1 Network Flow Chapter 7 of the book is about optimisation problems on networks. Section 7.1 gives a quick introduction to the definitions of graph theory. In fact I hope these are already known

More information

The min cost flow problem Course notes for Search and Optimization Spring 2004

The min cost flow problem Course notes for Search and Optimization Spring 2004 The min cost flow problem Course notes for Search and Optimization Spring 2004 Peter Bro Miltersen February 20, 2004 Version 1.3 1 Definition of the min cost flow problem We shall consider a generalization

More information

Lecture 13: Polynomial-Time Algorithms for Min Cost Flows. (Reading: AM&O Chapter 10)

Lecture 13: Polynomial-Time Algorithms for Min Cost Flows. (Reading: AM&O Chapter 10) Lecture 1: Polynomial-Time Algorithms for Min Cost Flows (Reading: AM&O Chapter 1) Polynomial Algorithms for Min Cost Flows Improvements on the two algorithms for min cost flow: Successive Shortest Path

More information

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time Network Flow 1 The Maximum-Flow Problem directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time 2 Maximum Flows and Minimum Cuts flows and cuts max flow equals

More information

Math 5490 Network Flows

Math 5490 Network Flows Math 90 Network Flows Lecture 8: Flow Decomposition Algorithm Stephen Billups University of Colorado at Denver Math 90Network Flows p./6 Flow Decomposition Algorithms Two approaches to modeling network

More information

Duality of LPs and Applications

Duality of LPs and Applications Lecture 6 Duality of LPs and Applications Last lecture we introduced duality of linear programs. We saw how to form duals, and proved both the weak and strong duality theorems. In this lecture we will

More information

4. Duality Duality 4.1 Duality of LPs and the duality theorem. min c T x x R n, c R n. s.t. ai Tx = b i i M a i R n

4. Duality Duality 4.1 Duality of LPs and the duality theorem. min c T x x R n, c R n. s.t. ai Tx = b i i M a i R n 2 4. Duality of LPs and the duality theorem... 22 4.2 Complementary slackness... 23 4.3 The shortest path problem and its dual... 24 4.4 Farkas' Lemma... 25 4.5 Dual information in the tableau... 26 4.6

More information

Chapter 7 Network Flow Problems, I

Chapter 7 Network Flow Problems, I Chapter 7 Network Flow Problems, I Network flow problems are the most frequently solved linear programming problems. They include as special cases, the assignment, transportation, maximum flow, and shortest

More information

Graphs and Network Flows IE411. Lecture 12. Dr. Ted Ralphs

Graphs and Network Flows IE411. Lecture 12. Dr. Ted Ralphs Graphs and Network Flows IE411 Lecture 12 Dr. Ted Ralphs IE411 Lecture 12 1 References for Today s Lecture Required reading Sections 21.1 21.2 References AMO Chapter 6 CLRS Sections 26.1 26.2 IE411 Lecture

More information

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows Matching Input: undirected graph G = (V, E). M E is a matching if each node appears in at most one Part V edge in M. Maximum Matching: find a matching of maximum cardinality Matchings Ernst Mayr, Harald

More information

Mathematics for Decision Making: An Introduction. Lecture 13

Mathematics for Decision Making: An Introduction. Lecture 13 Mathematics for Decision Making: An Introduction Lecture 13 Matthias Köppe UC Davis, Mathematics February 17, 2009 13 1 Reminder: Flows in networks General structure: Flows in networks In general, consider

More information

6.854 Advanced Algorithms

6.854 Advanced Algorithms 6.854 Advanced Algorithms Homework 5 Solutions 1 10 pts Define the following sets: P = positions on the results page C = clicked old results U = unclicked old results N = new results and let π : (C U)

More information

Discrete Optimization 2010 Lecture 3 Maximum Flows

Discrete Optimization 2010 Lecture 3 Maximum Flows Remainder: Shortest Paths Maximum Flows Discrete Optimization 2010 Lecture 3 Maximum Flows Marc Uetz University of Twente m.uetz@utwente.nl Lecture 3: sheet 1 / 29 Marc Uetz Discrete Optimization Outline

More information

Combinatorial Optimization

Combinatorial Optimization Combinatorial Optimization 2017-2018 1 Maximum matching on bipartite graphs Given a graph G = (V, E), find a maximum cardinal matching. 1.1 Direct algorithms Theorem 1.1 (Petersen, 1891) A matching M is

More information

7. Lecture notes on the ellipsoid algorithm

7. Lecture notes on the ellipsoid algorithm Massachusetts Institute of Technology Michel X. Goemans 18.433: Combinatorial Optimization 7. Lecture notes on the ellipsoid algorithm The simplex algorithm was the first algorithm proposed for linear

More information

Discrete Optimization 23

Discrete Optimization 23 Discrete Optimization 23 2 Total Unimodularity (TU) and Its Applications In this section we will discuss the total unimodularity theory and its applications to flows in networks. 2.1 Total Unimodularity:

More information

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees , 2009 Lecture 5: Shortest Paths & Spanning Trees University of Twente m.uetz@utwente.nl wwwhome.math.utwente.nl/~uetzm/dw/ Shortest Path Problem "#$%&'%()*%"()$#+,&- Given directed "#$%&'()*+,%+('-*.#/'01234564'.*,'7+"-%/8',&'5"4'84%#3

More information

3. Linear Programming and Polyhedral Combinatorics

3. Linear Programming and Polyhedral Combinatorics Massachusetts Institute of Technology 18.453: Combinatorial Optimization Michel X. Goemans April 5, 2017 3. Linear Programming and Polyhedral Combinatorics Summary of what was seen in the introductory

More information

Discrete Optimization

Discrete Optimization Prof. Friedrich Eisenbrand Martin Niemeier Due Date: April 15, 2010 Discussions: March 25, April 01 Discrete Optimization Spring 2010 s 3 You can hand in written solutions for up to two of the exercises

More information

Strongly Polynomial Algorithm for a Class of Minimum-Cost Flow Problems with Separable Convex Objectives

Strongly Polynomial Algorithm for a Class of Minimum-Cost Flow Problems with Separable Convex Objectives Strongly Polynomial Algorithm for a Class of Minimum-Cost Flow Problems with Separable Convex Objectives László A. Végh April 12, 2013 Abstract A well-studied nonlinear extension of the minimum-cost flow

More information

Contents. Introduction

Contents. Introduction Introduction Contents Chapter 1. Network Flows 1 1.1. Graphs 1 1.2. Shortest Paths 8 1.3. Maximum Flow 17 1.4. Min Cost Flows 22 List of frequently used Symbols 31 Bibliography 33 Index 37 iii i Introduction

More information

3. Linear Programming and Polyhedral Combinatorics

3. Linear Programming and Polyhedral Combinatorics Massachusetts Institute of Technology 18.433: Combinatorial Optimization Michel X. Goemans February 28th, 2013 3. Linear Programming and Polyhedral Combinatorics Summary of what was seen in the introductory

More information

Minimum cost transportation problem

Minimum cost transportation problem Minimum cost transportation problem Complements of Operations Research Giovanni Righini Università degli Studi di Milano Definitions The minimum cost transportation problem is a special case of the minimum

More information

Algorithms and Theory of Computation. Lecture 11: Network Flow

Algorithms and Theory of Computation. Lecture 11: Network Flow Algorithms and Theory of Computation Lecture 11: Network Flow Xiaohui Bei MAS 714 September 18, 2018 Nanyang Technological University MAS 714 September 18, 2018 1 / 26 Flow Network A flow network is a

More information

Maximum flow problem

Maximum flow problem Maximum flow problem 7000 Network flows Network Directed graph G = (V, E) Source node s V, sink node t V Edge capacities: cap : E R 0 Flow: f : E R 0 satisfying 1. Flow conservation constraints e:target(e)=v

More information

Algorithms: Lecture 12. Chalmers University of Technology

Algorithms: Lecture 12. Chalmers University of Technology Algorithms: Lecture 1 Chalmers University of Technology Today s Topics Shortest Paths Network Flow Algorithms Shortest Path in a Graph Shortest Path Problem Shortest path network. Directed graph G = (V,

More information

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs Instructor: Shaddin Dughmi Outline 1 Introduction 2 Shortest Path 3 Algorithms for Single-Source Shortest

More information

Relation of Pure Minimum Cost Flow Model to Linear Programming

Relation of Pure Minimum Cost Flow Model to Linear Programming Appendix A Page 1 Relation of Pure Minimum Cost Flow Model to Linear Programming The Network Model The network pure minimum cost flow model has m nodes. The external flows given by the vector b with m

More information

Lecture #21. c T x Ax b. maximize subject to

Lecture #21. c T x Ax b. maximize subject to COMPSCI 330: Design and Analysis of Algorithms 11/11/2014 Lecture #21 Lecturer: Debmalya Panigrahi Scribe: Samuel Haney 1 Overview In this lecture, we discuss linear programming. We first show that the

More information

Maximum Integer Flows in Directed Planar Graphs with Multiple Sources and Sinks and Vertex Capacities

Maximum Integer Flows in Directed Planar Graphs with Multiple Sources and Sinks and Vertex Capacities Maximum Integer Flows in Directed Planar Graphs with Multiple Sources and Sinks and Vertex Capacities Yipu Wang University of Illinois at Urbana-Champaign ywang298@illinois.edu July 12, 2018 Abstract We

More information

Lecture notes on the ellipsoid algorithm

Lecture notes on the ellipsoid algorithm Massachusetts Institute of Technology Handout 1 18.433: Combinatorial Optimization May 14th, 007 Michel X. Goemans Lecture notes on the ellipsoid algorithm The simplex algorithm was the first algorithm

More information

Lecture 3. 1 Polynomial-time algorithms for the maximum flow problem

Lecture 3. 1 Polynomial-time algorithms for the maximum flow problem ORIE 633 Network Flows August 30, 2007 Lecturer: David P. Williamson Lecture 3 Scribe: Gema Plaza-Martínez 1 Polynomial-time algorithms for the maximum flow problem 1.1 Introduction Let s turn now to considering

More information

Advanced Combinatorial Optimization September 22, Lecture 4

Advanced Combinatorial Optimization September 22, Lecture 4 8.48 Advanced Combinatorial Optimization September 22, 2009 Lecturer: Michel X. Goemans Lecture 4 Scribe: Yufei Zhao In this lecture, we discuss some results on edge coloring and also introduce the notion

More information

Lectures 6, 7 and part of 8

Lectures 6, 7 and part of 8 Lectures 6, 7 and part of 8 Uriel Feige April 26, May 3, May 10, 2015 1 Linear programming duality 1.1 The diet problem revisited Recall the diet problem from Lecture 1. There are n foods, m nutrients,

More information

CS 6820 Fall 2014 Lectures, October 3-20, 2014

CS 6820 Fall 2014 Lectures, October 3-20, 2014 Analysis of Algorithms Linear Programming Notes CS 6820 Fall 2014 Lectures, October 3-20, 2014 1 Linear programming The linear programming (LP) problem is the following optimization problem. We are given

More information

1 Matchings in Non-Bipartite Graphs

1 Matchings in Non-Bipartite Graphs CS 598CSC: Combinatorial Optimization Lecture date: Feb 9, 010 Instructor: Chandra Chekuri Scribe: Matthew Yancey 1 Matchings in Non-Bipartite Graphs We discuss matching in general undirected graphs. Given

More information

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6 The exam is three hours long and consists of 4 exercises. The exam is graded on a scale 0-25 points, and the points assigned to each question are indicated in parenthesis within the text. Problem 1 Consider

More information

Computer Science & Engineering 423/823 Design and Analysis of Algorithms

Computer Science & Engineering 423/823 Design and Analysis of Algorithms Bipartite Matching Computer Science & Engineering 423/823 Design and s Lecture 07 (Chapter 26) Stephen Scott (Adapted from Vinodchandran N. Variyam) 1 / 36 Spring 2010 Bipartite Matching 2 / 36 Can use

More information

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs Introduction to Mathematical Programming IE406 Lecture 10 Dr. Ted Ralphs IE406 Lecture 10 1 Reading for This Lecture Bertsimas 4.1-4.3 IE406 Lecture 10 2 Duality Theory: Motivation Consider the following

More information

Two Applications of Maximum Flow

Two Applications of Maximum Flow Two Applications of Maximum Flow The Bipartite Matching Problem a bipartite graph as a flow network maximum flow and maximum matching alternating paths perfect matchings 2 Circulation with Demands flows

More information

Maximum flow problem (part I)

Maximum flow problem (part I) Maximum flow problem (part I) Combinatorial Optimization Giovanni Righini Università degli Studi di Milano Definitions A flow network is a digraph D = (N,A) with two particular nodes s and t acting as

More information

Solutions to Exercises

Solutions to Exercises 1/13 Solutions to Exercises The exercises referred to as WS 1.1(a), and so forth, are from the course book: Williamson and Shmoys, The Design of Approximation Algorithms, Cambridge University Press, 2011,

More information

Flows. Chapter Circulations

Flows. Chapter Circulations Chapter 4 Flows For a directed graph D = (V,A), we define δ + (U) := {(u,v) A : u U,v / U} as the arcs leaving U and δ (U) := {(u,v) A u / U,v U} as the arcs entering U. 4. Circulations In a directed graph

More information

1 Integer Decomposition Property

1 Integer Decomposition Property CS 598CSC: Combinatorial Optimization Lecture date: Feb 2, 2010 Instructor: Chandra Chekuri Scribe: Siva Theja Maguluri Material taken mostly from [1] (Chapter 19). 1 Integer Decomposition Property A polyhedron

More information

Advanced Linear Programming: The Exercises

Advanced Linear Programming: The Exercises Advanced Linear Programming: The Exercises The answers are sometimes not written out completely. 1.5 a) min c T x + d T y Ax + By b y = x (1) First reformulation, using z smallest number satisfying x z

More information

Network Design and Game Theory Spring 2008 Lecture 6

Network Design and Game Theory Spring 2008 Lecture 6 Network Design and Game Theory Spring 2008 Lecture 6 Guest Lecturer: Aaron Archer Instructor: Mohammad T. Hajiaghayi Scribe: Fengming Wang March 3, 2008 1 Overview We study the Primal-dual, Lagrangian

More information

Topic: Balanced Cut, Sparsest Cut, and Metric Embeddings Date: 3/21/2007

Topic: Balanced Cut, Sparsest Cut, and Metric Embeddings Date: 3/21/2007 CS880: Approximations Algorithms Scribe: Tom Watson Lecturer: Shuchi Chawla Topic: Balanced Cut, Sparsest Cut, and Metric Embeddings Date: 3/21/2007 In the last lecture, we described an O(log k log D)-approximation

More information

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs LP-Duality ( Approximation Algorithms by V. Vazirani, Chapter 12) - Well-characterized problems, min-max relations, approximate certificates - LP problems in the standard form, primal and dual linear programs

More information

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017

CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017 CSC373: Algorithm Design, Analysis and Complexity Fall 2017 DENIS PANKRATOV NOVEMBER 1, 2017 Linear Function f: R n R is linear if it can be written as f x = a T x for some a R n Example: f x 1, x 2 =

More information

Breadth First Search, Dijkstra s Algorithm for Shortest Paths

Breadth First Search, Dijkstra s Algorithm for Shortest Paths CS 374: Algorithms & Models of Computation, Spring 2017 Breadth First Search, Dijkstra s Algorithm for Shortest Paths Lecture 17 March 1, 2017 Chandra Chekuri (UIUC) CS374 1 Spring 2017 1 / 42 Part I Breadth

More information

Multicommodity Flows and Column Generation

Multicommodity Flows and Column Generation Lecture Notes Multicommodity Flows and Column Generation Marc Pfetsch Zuse Institute Berlin pfetsch@zib.de last change: 2/8/2006 Technische Universität Berlin Fakultät II, Institut für Mathematik WS 2006/07

More information

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14 The exam is three hours long and consists of 4 exercises. The exam is graded on a scale 0-25 points, and the points assigned to each question are indicated in parenthesis within the text. If necessary,

More information

"SYMMETRIC" PRIMAL-DUAL PAIR

SYMMETRIC PRIMAL-DUAL PAIR "SYMMETRIC" PRIMAL-DUAL PAIR PRIMAL Minimize cx DUAL Maximize y T b st Ax b st A T y c T x y Here c 1 n, x n 1, b m 1, A m n, y m 1, WITH THE PRIMAL IN STANDARD FORM... Minimize cx Maximize y T b st Ax

More information

Flows and Cuts. 1 Concepts. CS 787: Advanced Algorithms. Instructor: Dieter van Melkebeek

Flows and Cuts. 1 Concepts. CS 787: Advanced Algorithms. Instructor: Dieter van Melkebeek CS 787: Advanced Algorithms Flows and Cuts Instructor: Dieter van Melkebeek This lecture covers the construction of optimal flows and cuts in networks, their relationship, and some applications. It paves

More information

III. Linear Programming

III. Linear Programming III. Linear Programming Thomas Sauerwald Easter 2017 Outline Introduction Standard and Slack Forms Formulating Problems as Linear Programs Simplex Algorithm Finding an Initial Solution III. Linear Programming

More information

3.10 Lagrangian relaxation

3.10 Lagrangian relaxation 3.10 Lagrangian relaxation Consider a generic ILP problem min {c t x : Ax b, Dx d, x Z n } with integer coefficients. Suppose Dx d are the complicating constraints. Often the linear relaxation and the

More information

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} Preliminaries Graphs G = (V, E), V : set of vertices E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) 1 2 3 5 4 V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} 1 Directed Graph (Digraph)

More information

IE 5531: Engineering Optimization I

IE 5531: Engineering Optimization I IE 5531: Engineering Optimization I Lecture 7: Duality and applications Prof. John Gunnar Carlsson September 29, 2010 Prof. John Gunnar Carlsson IE 5531: Engineering Optimization I September 29, 2010 1

More information

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Dynamic Programming: Shortest Paths and DFA to Reg Exps CS 374: Algorithms & Models of Computation, Spring 207 Dynamic Programming: Shortest Paths and DFA to Reg Exps Lecture 8 March 28, 207 Chandra Chekuri (UIUC) CS374 Spring 207 / 56 Part I Shortest Paths

More information

The Steiner Network Problem

The Steiner Network Problem The Steiner Network Problem Pekka Orponen T-79.7001 Postgraduate Course on Theoretical Computer Science 7.4.2008 Outline 1. The Steiner Network Problem Linear programming formulation LP relaxation 2. The

More information

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Matroids Shortest Paths Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Marc Uetz University of Twente m.uetz@utwente.nl Lecture 2: sheet 1 / 25 Marc Uetz Discrete Optimization Matroids

More information

Introduction 1.1 PROBLEM FORMULATION

Introduction 1.1 PROBLEM FORMULATION Introduction. PROBLEM FORMULATION This book deals with a single type of network optimization problem with linear cost, known as the transshipment or minimum cost flow problem. In this section, we formulate

More information

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502) Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik Combinatorial Optimization (MA 4502) Dr. Michael Ritter Problem Sheet 1 Homework Problems Exercise

More information

Cutting Plane Methods II

Cutting Plane Methods II 6.859/5.083 Integer Programming and Combinatorial Optimization Fall 2009 Cutting Plane Methods II Gomory-Chvátal cuts Reminder P = {x R n : Ax b} with A Z m n, b Z m. For λ [0, ) m such that λ A Z n, (λ

More information

Robust Network Codes for Unicast Connections: A Case Study

Robust Network Codes for Unicast Connections: A Case Study Robust Network Codes for Unicast Connections: A Case Study Salim Y. El Rouayheb, Alex Sprintson, and Costas Georghiades Department of Electrical and Computer Engineering Texas A&M University College Station,

More information

Linear Programming Duality

Linear Programming Duality Summer 2011 Optimization I Lecture 8 1 Duality recap Linear Programming Duality We motivated the dual of a linear program by thinking about the best possible lower bound on the optimal value we can achieve

More information

Linear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47

Linear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47 Linear Programming Jie Wang University of Massachusetts Lowell Department of Computer Science J. Wang (UMass Lowell) Linear Programming 1 / 47 Linear function: f (x 1, x 2,..., x n ) = n a i x i, i=1 where

More information

The simplex algorithm

The simplex algorithm The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case. It does yield insight into linear programs, however,

More information

CS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs. Instructor: Shaddin Dughmi

CS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs. Instructor: Shaddin Dughmi CS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs Instructor: Shaddin Dughmi Outline 1 Introduction 2 Shortest Path 3 Algorithms for Single-Source

More information

Flow Network. The following figure shows an example of a flow network:

Flow Network. The following figure shows an example of a flow network: Maximum Flow 1 Flow Network The following figure shows an example of a flow network: 16 V 1 12 V 3 20 s 10 4 9 7 t 13 4 V 2 V 4 14 A flow network G = (V,E) is a directed graph. Each edge (u, v) E has a

More information

Santa Claus Schedules Jobs on Unrelated Machines

Santa Claus Schedules Jobs on Unrelated Machines Santa Claus Schedules Jobs on Unrelated Machines Ola Svensson (osven@kth.se) Royal Institute of Technology - KTH Stockholm, Sweden March 22, 2011 arxiv:1011.1168v2 [cs.ds] 21 Mar 2011 Abstract One of the

More information

Exact and Approximate Equilibria for Optimal Group Network Formation

Exact and Approximate Equilibria for Optimal Group Network Formation Exact and Approximate Equilibria for Optimal Group Network Formation Elliot Anshelevich and Bugra Caskurlu Computer Science Department, RPI, 110 8th Street, Troy, NY 12180 {eanshel,caskub}@cs.rpi.edu Abstract.

More information

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Dynamic Programming: Shortest Paths and DFA to Reg Exps CS 374: Algorithms & Models of Computation, Fall 205 Dynamic Programming: Shortest Paths and DFA to Reg Exps Lecture 7 October 22, 205 Chandra & Manoj (UIUC) CS374 Fall 205 / 54 Part I Shortest Paths with

More information

Topic: Primal-Dual Algorithms Date: We finished our discussion of randomized rounding and began talking about LP Duality.

Topic: Primal-Dual Algorithms Date: We finished our discussion of randomized rounding and began talking about LP Duality. CS787: Advanced Algorithms Scribe: Amanda Burton, Leah Kluegel Lecturer: Shuchi Chawla Topic: Primal-Dual Algorithms Date: 10-17-07 14.1 Last Time We finished our discussion of randomized rounding and

More information

On shredders and vertex connectivity augmentation

On shredders and vertex connectivity augmentation On shredders and vertex connectivity augmentation Gilad Liberman The Open University of Israel giladliberman@gmail.com Zeev Nutov The Open University of Israel nutov@openu.ac.il Abstract We consider the

More information

Shortest paths with negative lengths

Shortest paths with negative lengths Chapter 8 Shortest paths with negative lengths In this chapter we give a linear-space, nearly linear-time algorithm that, given a directed planar graph G with real positive and negative lengths, but no

More information

Worst case analysis for a general class of on-line lot-sizing heuristics

Worst case analysis for a general class of on-line lot-sizing heuristics Worst case analysis for a general class of on-line lot-sizing heuristics Wilco van den Heuvel a, Albert P.M. Wagelmans a a Econometric Institute and Erasmus Research Institute of Management, Erasmus University

More information

A simplex method for uncapacitated pure-supply and pure-demand infinite network flow problems

A simplex method for uncapacitated pure-supply and pure-demand infinite network flow problems A simplex method for uncapacitated pure-supply and pure-demand infinite network flow problems Christopher Thomas Ryan Robert L Smith Marina Epelman July 6, 2017 Abstract We provide a simplex algorithm

More information

The Maximum Flows in Planar Dynamic Networks

The Maximum Flows in Planar Dynamic Networks INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL ISSN 1841-9836, 11(2):282-291, April 2016. The Maximum Flows in Planar Dynamic Networks C. Schiopu, E. Ciurea Camelia Schiopu* 1. Transilvania

More information

16.1 Min-Cut as an LP

16.1 Min-Cut as an LP 600.469 / 600.669 Approximation Algorithms Lecturer: Michael Dinitz Topic: LPs as Metrics: Min Cut and Multiway Cut Date: 4//5 Scribe: Gabriel Kaptchuk 6. Min-Cut as an LP We recall the basic definition

More information

CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2)

CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2) CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2) Tim Roughgarden February 2, 2016 1 Recap This is our third lecture on linear programming, and the second on linear programming

More information

Lecture 15 (Oct 6): LP Duality

Lecture 15 (Oct 6): LP Duality CMPUT 675: Approximation Algorithms Fall 2014 Lecturer: Zachary Friggstad Lecture 15 (Oct 6): LP Duality Scribe: Zachary Friggstad 15.1 Introduction by Example Given a linear program and a feasible solution

More information

The Simplex Algorithm

The Simplex Algorithm 8.433 Combinatorial Optimization The Simplex Algorithm October 6, 8 Lecturer: Santosh Vempala We proved the following: Lemma (Farkas). Let A R m n, b R m. Exactly one of the following conditions is true:.

More information

Linear Programming Redux

Linear Programming Redux Linear Programming Redux Jim Bremer May 12, 2008 The purpose of these notes is to review the basics of linear programming and the simplex method in a clear, concise, and comprehensive way. The book contains

More information

Breadth-First Search of Graphs

Breadth-First Search of Graphs Breadth-First Search of Graphs Analysis of Algorithms Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Applications of Breadth-First Search of Graphs a) Single Source

More information

Chapter 1 Linear Programming. Paragraph 5 Duality

Chapter 1 Linear Programming. Paragraph 5 Duality Chapter 1 Linear Programming Paragraph 5 Duality What we did so far We developed the 2-Phase Simplex Algorithm: Hop (reasonably) from basic solution (bs) to bs until you find a basic feasible solution

More information

A FAST MAX FLOW ALGORITHM

A FAST MAX FLOW ALGORITHM A FAST MAX FLOW ALGORITHM Xiaoyue Gong MIT, xygong@mit.edu James B. Orlin MIT, jorlin@mit.edu Abstract. In 2013, Orlin proved that the max flow problem could be solved in O(nm) time. His algorithm ran

More information

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004 Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004 1 In this section we lean about duality, which is another way to approach linear programming. In particular, we will see: How to define

More information

Chap6 Duality Theory and Sensitivity Analysis

Chap6 Duality Theory and Sensitivity Analysis Chap6 Duality Theory and Sensitivity Analysis The rationale of duality theory Max 4x 1 + x 2 + 5x 3 + 3x 4 S.T. x 1 x 2 x 3 + 3x 4 1 5x 1 + x 2 + 3x 3 + 8x 4 55 x 1 + 2x 2 + 3x 3 5x 4 3 x 1 ~x 4 0 If we

More information

ECE 307 Techniques for Engineering Decisions

ECE 307 Techniques for Engineering Decisions ECE 7 Techniques for Engineering Decisions Introduction to the Simple Algorithm George Gross Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign ECE 7 5 9 George

More information

5 Flows and cuts in digraphs

5 Flows and cuts in digraphs 5 Flows and cuts in digraphs Recall that a digraph or network is a pair G = (V, E) where V is a set and E is a multiset of ordered pairs of elements of V, which we refer to as arcs. Note that two vertices

More information

CSCE423/823. Introduction. Flow Networks. Ford-Fulkerson Method. Edmonds-Karp Algorithm. Maximum Bipartite Matching 2/35 CSCE423/823.

CSCE423/823. Introduction. Flow Networks. Ford-Fulkerson Method. Edmonds-Karp Algorithm. Maximum Bipartite Matching 2/35 CSCE423/823. 1/35 2pt 0em Computer Science & Engineering 423/823 Design and s Lecture 07 (Chapter 26) Stephen Scott (Adapted from Vinodchandran N. Variyam) 2/35 Can use a directed graph as a flow network to model:

More information

An Analysis of the Highest-Level Selection Rule in the Preflow-Push Max-Flow Algorithm

An Analysis of the Highest-Level Selection Rule in the Preflow-Push Max-Flow Algorithm An Analysis of the Highest-Level Selection Rule in the Preflow-Push Max-Flow Algorithm Joseph Cheriyan Kurt Mehlhorn August 20, 1998 Abstract Consider the problem of finding a maximum flow in a network.

More information

Nowhere-zero flows in signed series-parallel graphs arxiv: v1 [math.co] 6 Nov 2014

Nowhere-zero flows in signed series-parallel graphs arxiv: v1 [math.co] 6 Nov 2014 Nowhere-zero flows in signed series-parallel graphs arxiv:1411.1788v1 [math.co] 6 Nov 2014 Tomáš Kaiser 1,2 Edita Rollová 1,3 Abstract Bouchet conjectured in 1983 that each signed graph that admits a nowhere-zero

More information

Extreme Point Solutions for Infinite Network Flow Problems

Extreme Point Solutions for Infinite Network Flow Problems Extreme Point Solutions for Infinite Network Flow Problems H. Edwin Romeijn Dushyant Sharma Robert L. Smith January 3, 004 Abstract We study capacitated network flow problems with supplies and demands

More information

Recall: Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching

Recall: Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching Recall: Matchings A matching is a set of (non-loop) edges with no shared endpoints. The vertices incident to an edge of a matching M are saturated by M, the others are unsaturated. A perfect matching of

More information

Semidefinite and Second Order Cone Programming Seminar Fall 2001 Lecture 5

Semidefinite and Second Order Cone Programming Seminar Fall 2001 Lecture 5 Semidefinite and Second Order Cone Programming Seminar Fall 2001 Lecture 5 Instructor: Farid Alizadeh Scribe: Anton Riabov 10/08/2001 1 Overview We continue studying the maximum eigenvalue SDP, and generalize

More information

We say that a flow is feasible for G (or just feasible if the graph and capacity function in question are obvious) if

We say that a flow is feasible for G (or just feasible if the graph and capacity function in question are obvious) if CS787: Advanced Algorithms Lecture 4: Network Flow We devote this lecture to the network flow problem and the max-flow min-cut theorem. A number of other problems can be cast into a maximum flow or minimum

More information