Download presentation

Presentation is loading. Please wait.

Published byGuadalupe Modrell Modified about 1 year ago

1
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: u ij is the capacity on arc (i,j). Find non-negative flow f ij for each arc (i,j) such that for each node, except s and t, the total incoming flow is equal to the total outgoing flow (flow conservation), such that f ij is at most the capacity u ij on arc (i,j); The total amount of flow going out of s (which is equal to the total amount of flow coming into t ) is maximized

2
3 t 4 1 2 s 2 1 4 23 2 1 4 3 4 1 the black numbers next to an arc is its capacity

3
3 t 4 1 2 s 2 1 4 23 2 1 4 3 4 1 C ts = -1 Set costs all other arcs at 0 The minimum cost flow circulation (Af=0) maximises the s-t flow

4
3 t 4 1 2 s 2 1 4 23 2 1 4 3 4 1 the black numbers next to an arc is its capacity Push flow over the path s-1-4-t The bottlenecks on this path are the edges {1,4} and {4,t}. So we can send flow 2 along this path

5
3 t 4 1 2 s 2 1 4 3 2 1 4 2 3 4 1 the black number next to an arc is its capacity the green number next to an arc is the flow on it We can push another extra flow of 1 on the path s-1-3-t. The bottleneck is now {s,1} with remaining capacity 1.

6
3 t 4 1 2 s 2 1 4 3 1 2 1 4 3 1 4 1 the black number next to an arc is its capacity the green number next to an arc is the flow on it Since {4,t} is on its capacity, the only path remaining through which we can send extra flow is s-2-4-3-t. Here {4,3} is the bottleneck and thus we can send extra flow of 1

7
3 t 4 1 2 s 2 1 1 4 2 3 1 2 1 1 4 3 2 4 1 the black number next to an arc is its capacity the green number next to an arc is the flow on it There are no s-t paths left on which we can send extra flow. So is this the maximal flow?

8
the residual graph 3 t 4 1 2 s 2 1 1 3 4 2 23 1 1 2 1 1 3 4 3 3 2 2 4 1 1 blue arcs (i,j) are forward arcs (f ij __0) the blue number is the residual capacity of a blue arc the green number is the capacity of a green arc the black number is the original capacity of the arc
__

9
the residual graph 3 t 4 1 2 s 2 1 1 3 23 1 1 1 3 2 1 red arcs form an s-t-path in the residual graph and therefore a flow-augmenting path in the original network 3

10
the residual graph 3 t 4 1 2 s 2 1 1 3 23 1 1 1 3 2 1 red arcs form an augmenting path Augment the flow by the minimum capacity of a red arc, i.e, 1 3

11
the residual graph 3 t 4 1 2 s 2 1 1 3 23 1 1 1 3 2 1 Augment the flow by the minimum capacity of a red arc, i.e, 1: - increase the flow by 1 on all arcs corresponding to forward red arcs - decrease the flow by 1 on all arcs corresponding to backward red arcs 3

12
the residual graph 3 t 4 1 2 s 2 1 2 3 2 1 3 1 1 Augment the flow by the minimum capacity of a red arc, i.e, 1: - increase the flow by 1 on all arcs corresponding to forward red arcs - decrease the flow by 1 on all arcs corresponding to backward red arcs Construct the new residual graph 3 1

13
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 An s-t cut is defined by a set S of the nodes with s in S and t not in S.

14
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 An s-t cut is defined by a set S of the nodes with s in S and t not in S. S={s,1,2}

15
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 An s-t cut is defined by a set S of the nodes with s in S and t not in S Size of cut S is the sum of the capacities on the arcs from S to N\S. S={s,1,2}

16
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 An s-t cut is defined by a set S of the nodes with s in S and t not in S Size of cut S is the sum of the capacities on the arcs from S to N\S. C(S)=u 13 +u 14 +u 24 = 2+2+4=8

17
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 C(S 1 )=u s1 +u 24 = 2+4=6 S1S1

18
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S1S1 S2S2

19
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 S2S2 Max Flow ≤ Min Cut

20
3 t 4 1 2 s 2 1 4 23 2 1 4 2 4 1 C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 Max Flow ≤ Min Cut f s1 +f s2 ≤ Min Cut ≤ 5

21
t 4 1 2 s 2 1 2 3 2 1 3 1 1 3 1 the residual graph Max Flow = Min Cut f s1 +f s2 =2+3=5 = C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2

22
t 4 1 2 s 2 1 2 3 2 1 3 1 1 3 1 the residual graph Max Flow = Min Cut f s1 +f s2 =2+3=5 = C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 Theorem: Max Flow = Min Cut

23
t 4 1 2 s 2 1 2 3 2 1 3 1 1 3 1 Proof sketch of Max Flow=Min Cut f s1 +f s2 =2+3=5 = C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 There is no s-t-path in the residual graph!!! S 2 ={s,1,2,4} the set of nodes reachable from S

24
3 t 4 1 2 s 2 1 0 4 2 2 1 3 0 2 2 1 0 4 3 2 2 4 3 1 C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 f s1 +f s2 =2+3=5 = Proof sketch of Max Flow=Min Cut from S 2 ={s,1,2,4} to {3,t} f 13 = u 13 = 2 f 43 = u 43 = 1 f 4t = u 4t = 2

25
3 t 4 1 2 s 2 1 0 4 2 2 1 3 0 2 2 1 0 4 3 2 2 4 3 1 C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 f s1 +f s2 =2+3=5 = from S 2 ={s,1,2,4} to {3,t} f 13 = u 13 = 2 f 43 = u 43 = 1 f 4t = u 4t = 2 Full capacity of cut is used Proof sketch of Max Flow=Min Cut

26
3 t 4 1 2 s 2 1 0 4 2 2 1 3 0 2 2 1 0 4 3 2 2 4 3 1 C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 f s1 +f s2 =2+3=5 = from S 2 ={s,1,2,4} to {3,t} f 13 = u 13 = 2 f 43 = u 43 = 1 f 4t = u 4t = 2 Full capacity of cut is used from {3,t} to {S 2 ={s,1,2,4} f 32 = 0 f 34 = 0 Proof sketch of Max Flow=Min Cut

27
3 t 4 1 2 s 2 1 0 4 2 2 1 3 0 2 2 1 0 4 3 2 2 4 3 1 C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 f s1 +f s2 =2+3=5 = from S 2 ={s,1,2,4} to {3,t} f 13 = u 13 = 2 f 43 = u 43 = 1 f 4t = u 4t = 2 Full capacity of cut is used from {3,t} to {S 2 ={s,1,2,4} f 32 = 0 f 34 = 0 nothing flows back across the cut Proof sketch of Max Flow=Min Cut

28
3 t 4 1 2 s 2 1 0 4 2 2 1 3 0 2 2 1 0 4 3 2 2 4 3 1 C(S 2 )=u 13 +u 43 +u 4t = 2+1+2=5 S2S2 f s1 +f s2 =2+3=5 = from S 2 ={s,1,2,4} to {3,t} f 13 = u 13 = 2 f 43 = u 43 = 1 f 4t = u 4t = 2 from {3,t} to {S 2 ={s,1,2,4} f 32 = 0 f 34 = 0 Proof sketch of Max Flow=Min Cut Capacity of the cut is equal to the flow from s to t

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google