Presentation is loading. Please wait.

Presentation is loading. Please wait.

Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.

Similar presentations


Presentation on theme: "Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t."— Presentation transcript:

1 EMIS 8374 Solving Max Flow Problems with Non-Zero Lower Bounds Updated 18 March 2008

2 Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t

3 Example Max Flow Problem
(, u) (0,2) 2 4 (0,5) (0,4) 1 6 (3,6) (5,6) t s (0,5) (0,6) 3 5 (0,7) (7,8)

4 Step 1: Convert to Circulation Problem
(0,2) 2 4 (0,5) (0,4) 1 6 (3,6) (5,6) (0,5) (0,6) 3 5 (0,7) (7,8) (0,)

5 Preflow Satisfies capacity constraints
Does not have to satisfy node-balance constraints

6 Step 2: Put a Preflow of pij = ij on (i, j)
2 4 1 6 3 5 3 5 7

7 Step 3: Calculate excess e(i) for each i
(3+0) – (0+0) = 3 (0+0) – 5 = -5 2 4 1 6 3 5 3 5 7 (5+0) – (0+7) = -2 7 – (0+3) = 4

8 Network with preflow and excess
3 -5 2 4 1 6 3 5 3 5 7 4 -2

9 Step 4: Let u'ij = uij - pij for each arc and remove preflow
3 -5 (0,2) 2 4 (0,5) (0,4) 1 6 (0,3) (0,1) (0,5) (0,6) 3 5 (0,7) (0,1) 4 -2 (0,)

10 Step 5: Add s' and t' t' s' 2 4 1 6 3 5 (0,3) (0,5) (0,2) (0,2) (0,4)
(0,1) (0,5) (0,6) 3 5 (0,7) (0,1) (0,)

11 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.

12 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 .

13 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.

14 Step 6: Find Max s'-t' Flow x
(3,3) (x, u) (5,5) s' (2,2) 2 4 (2,2) (4,4) (3,4) (1,5) 1 6 (0,3) (0,1) (0,5) (4,6) 3 5 (2,7) (0,1) (5,)

15 Step 7: Remove s' and t' 2 4 1 6 3 5 (x, u) (2,2) (3,4) (1,5) (0,3)
(0,1) (0,5) (4,6) 3 5 (2,7) (0,1) (5,)

16 Original Network with Flow x
(0+0) – (1+2) = -3 (2+3) – 0 = 5 2 2 4 3 1 1 6 5 4 3 5 2 (2+0) – (0+0) = 2 0 – (4+0) = -4

17 Step 8: Balance the Flow by Adding Preflow p
2 2 4 3 1 1 6 0+3=3 0+5=5 5 4 3 5 2 0+7=7

18 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,1,5) (0,3,4) 1 6 s (3,3,6) t (5,5,6) (0,0,5) (0,4,6) 3 5 (0,2,7) (7,7,8)

19 Step 10: Construct the Residual Network
2 2 4 1 4 3 t 1 6 s 3 1 5 2 2 3 5 5 4 1

20 Step 11: Use Augmenting Path Algorithm to Find the Max Flow
2 2 4 1 4 3 t 1 6 s 3 1 5 2 2 3 5 5 4 1

21 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

22 Residual Network 5 2 2 4 4 1 t 1 6 s 3 1 4 1 1 6 3 5 6 1

23 Maximum Flow 2 4 1 6 3 5 (, x + p, u) (0, ,2) (0, ,5) (0, ,4) s
(0, ,2) 2 4 (0, ,5) (0, ,4) 1 6 s (0, ,5) (3, ,6) t (5, ,6) (0, ,6) 3 5 (0, ,7) (7, ,8)

24 Example 2 2 (3,5) (, u) 1 s (0,2) 3 t

25 Example 2: Circulation & Preflow
-3 2 2 (3,5) 3 3 1 (0,2) 1 3 (0,) 3

26 Example 2: Max s'-t' Flow Prob.
(0,3) t' 2 (0,2) (0,3) 1 (, u) (0,2) 3 (0,)

27 Example 2: Max s'-t' Flow s' t' 2 1 3 (2,3) (x, u) (0,2)
Source and sink arcs not saturated. Problem is infeasible. (2,3) 1 (2,2) 3 (2,)


Download ppt "Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t."

Similar presentations


Ads by Google