270 likes | 283 Views
Learn how to solve maximum flow problems with non-zero lower bounds in this updated tutorial. Understand the steps involved and the feasibility of the problem.
E N D
EMIS 8374 Solving Max Flow Problems with Non-Zero Lower BoundsUpdated 18 March 2008
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t
Example Max Flow Problem (, u) (0,2) 2 4 (0,4) (0,5) 1 6 (3,6) (5,6) t s (0,5) (0,6) 3 5 (0,7) (7,8)
Step 1: Convert to Circulation Problem (0,2) 2 4 (0,4) (0,5) 1 6 (3,6) (5,6) (0,5) (0,6) 3 5 (0,7) (7,8) (0,)
Preflow • Satisfies capacity constraints • Does not have to satisfy node-balance constraints
Step 2: Put a Preflow of pij = ij on (i, j) 0 2 4 0 0 1 6 3 5 0 0 3 5 0 7 0
Step 3: Calculate excesse(i) for each i (3+0) – (0+0) = 3 (0+0) – 5 = -5 0 2 4 0 0 0 1 6 3 5 0 0 0 0 3 5 0 7 (5+0) – (0+7) = -2 7 – (0+3) = 4
Network with preflow and excess 3 -5 0 2 4 0 0 0 1 6 3 5 0 0 0 0 3 5 0 7 4 -2
Step 4: Let u'ij = uij-pij for each arc and remove preflow 3 -5 (0,2) 2 4 (0,4) (0,5) 1 6 (0,3) (0,1) (0,5) (0,6) 3 5 (0,7) (0,1) 4 (0,) -2
Step 5: Add s' and t' t' s' (0,5) (0,3) (0,2) (0,2) 2 4 (0,4) (0,4) (0,5) 1 6 (0,3) (0,1) (0,5) (0,6) 3 5 (0,7) (0,1) (0,)
Max s'-t' Flow Problem • If e(j) < 0 then let cs'j = -e(j) • If e(i) > 0 then let cit' = e(i) • Let x be a maximum s'-t' flow. If this flow saturates the source- and sink-adjacent arcs, then it can be added to the preflow to create a feasible flow in the original network. • Otherwise, the original problem is infeasible.
Max s'-t' Flow Problem • Suppose that the max flow x saturates arc (s',4): • The flow x is balanced at all nodes. • xs'j = 5 = -e(4). • If we then remove s' and (s',4), node 4 will become unbalanced. It will send out 5 more units than it takes in. • Adding back the preflow p54 = 5 will rebalance node 4 .
Max s'-t' Flow Problem • Suppose that the max flow x saturates arc (2, t'): • The flow x is balanced at all nodes. • xt'j = 3 = e(2). • If we then remove t' and (2, t'), node 2 will become unbalanced. It will receive 3 more units than it sends out. • Adding back the preflow p23 = 3 will rebalance the node.
Step 6: Find Max s'-t' Flow x t' s' (5,5) (3,3) (x, u) (2,2) (2,2) 2 4 (4,4) (3,4) (1,5) 1 6 (0,3) (0,1) (0,5) (4,6) 3 5 (2,7) (0,1) (5,)
Step 7: Remove s' and t' (x, u) (2,2) 2 4 (3,4) (1,5) 1 6 (0,3) (0,1) (0,5) (4,6) 3 5 (2,7) (0,1) (5,)
Original Network with Flow x (0+0) – (1+2) = -3 (2+3) – 0 = 5 2 2 4 3 1 0 1 6 0 0 0 0 5 4 3 5 2 0 (2+0) – (0+0) = 2 0 – (4+0) = -4
Step 8: Balance the Flow by Adding Preflow p 2 2 4 3 1 1 6 0+3=3 0+5=5 0 5 4 3 5 2 0+7=7
Step 9: Remove Arc from t to s We now have a feasible flow (v = 5) for the original problem. (, x + p, u) (0,2,2) 2 4 (0,3,4) (0,1,5) 1 6 s (3,3,6) t (5,5,6) (0,0,5) (0,4,6) 3 5 (0,2,7) (7,7,8)
Step 10: Construct the Residual Network 1 2 2 4 1 3 4 t 1 6 s 3 1 5 2 2 3 5 5 4 1
Step 11: Use Augmenting Path Algorithm to Find the Max Flow 1 2 2 4 1 3 4 t 1 6 s 3 1 5 2 2 3 5 5 4 1
Augmenting Path in the Residual Network 5 2 2 4 1 3 1 t 1 6 s 3 1 4 2 1 6 3 5 4 1
Residual Network 5 2 2 4 4 1 t 1 6 s 3 1 4 1 1 6 3 5 6 1
Maximum Flow v = 10 (, x + p, u) (0,2,2) 2 4 (0,4,4) (0,5,5) 1 6 s (0,4,5) (3,3,6) t (5,6,6) (0,5,6) 3 5 (0,6,7) (7,8,8)
Example 2 2 (3,5) (, u) 1 s (0,2) 3 t
Example 2: Circulation & Preflow (, u) -3 2 2 (3,5) 3 3 1 1 (0,2) 0 3 (0,) 3 0 0
Example 2: Max s'-t' Flow Prob. s' (0,3) t' 2 (0,2) (0,3) (, u) 1 (0,2) 3 (0,)
Example 2: Max s'-t' Flow s' (2,3) (x, u) t' 2 (0,2) Source and sink arcs not saturated. Problem is infeasible. (2,3) 1 (2,2) 3 (2,)