max flows and minimum cuts
play

Max Flows and Minimum Cuts Carlo Mannino (from Geir Dahl notes) - PowerPoint PPT Presentation

Max Flows and Minimum Cuts Carlo Mannino (from Geir Dahl notes) University of Oslo, INF-MAT5360 - Autumn 2011 (Mathematical optimization) st-flow Given a directed graph D = ( V,E ) ( x , c ) 2 distinct vertices s,t V (1,1) 1 4 (2,2)


  1. Max Flows and Minimum Cuts Carlo Mannino (from Geir Dahl notes) University of Oslo, INF-MAT5360 - Autumn 2011 (Mathematical optimization)

  2. st-flow Given a directed graph D = ( V,E ) ( x , c ) 2 distinct vertices s,t  V (1,1) 1 4 (2,2) (2,3) s source: no edges entering s (1,1) (1,1) s t t sink : no edges outgoing from t (2,3) (2,2) 2 3 Edge capacity function c : E  R + (3,3) An st-flow is a function x : E  R, satisfying     flow conservation constraints x ( e ) x ( e ) ( v V \ { s , t })       e ( v ) e ( v )  x  non-negativity and capacity constraints 0 c Obs: div x ( v ) = 0 for all v  s,t .

  3. Flow value e    val ( x ) x ( e ) div ( s ) VALUE of an st-flow = flow outgoing from s x    ( s ) Theorem (net st-flow through an st-cut) Let  + ( S ) be an st- cut of D = ( V,E) and x be an st -flow. Then   Hajhsas   x ( e ) x ( e ) val ( x ) da       e ( S ) e ( S )    Since s  S and t  S we have div ( v ) div ( s ) val ( x ) x x  v S      x ( e ) x ( e ) div ( v ) The result follows from        v S e ( S ) e ( S ) Corollary (the flow sent by s equals the flow into t ) Let  + ( S ) be a st- cut of D = ( V,E) and x be an st -flow. Then   Hajhsas   val ( x ) x ( e ) div ( t ) da x    e ( t )

  4. The maximum st -flow problem Maximum st-flow problem Given a directed graph D = (V,E) with edge capacity c : E  R + , Hajhsas source s and sink t , find an st-flow of maximum value. da  maximize flow value max x ( e )      e ( s )   flow conservation constraints x ( e ) x ( e ) ( v V \ { s , t })       e ( v ) e ( v )  x  non-negativity and capacity constraints 0 c LP- program: optimum exists. We can apply simplex method. More effective combinatorial algorithms.

  5. Minimum st-cut K 1 Let K =  + ( S ) be an st-cut ( s  S, t  S ) 1 4 2 3 s t CAPACITY of K: cap c ( K ) =  1 1 ( ) c e 3 2  K 2 3 e 3 cap c ( K ) = 6 Minimum st-cut problem Given a directed graph D = ( V , E ) with edge capacity c : E  R + , Hajhsas source s and sink t , find an st-cut with minimum capacity. da Combinatorial optimization problem with linear objective function.

  6. Minimum st-cut Lemma (weak max-flow min-cut property ) The following inequality holds: Hajhsas max{val( x ): x is st-flow }  min{cap c ( K ): K is st-cut } da Let K =  + ( S ) be a (minimum capacity) st-cut ( s  S, t  S )          val ( x ) x ( e ) x ( e ) x ( e ) c ( e ) cap ( K ) c             e ( S ) e ( S ) e ( S ) e ( S )

  7. The max-flow min-cut theorem Theorem (max-flow / min-cut ) The value of a maximum st -flow equals the minimum st-cut capacity: Hajhsas max{val( x ): x is st-flow } = min{cap c ( K ): K is st-cut } da ( l , u ) Let M = min{cap c ( K ): K is st-cut } (0, c e ) D ’ The flow value is no larger than M s t Build graph D’ from D adding edge ( t,s ) Let l ( t,s ) = u ( t,s ) = M ; l ( e ) = 0, u ( e ) = c ( e ) for e  E ( M , M ) We show that D’ , l and u satisfy Hoffman’s conditions     l ( e ) u ( e ) ( S V )       e ( S ) e ( S ) and D’ admits a circulation x’.

  8. Minimum st-cut   Hoffman’s   (0, c e ) l ( e ) u ( e ) ( S V ) D ’ condition       e ( S ) e ( S ) s t       1. If ( t,s )   - ( S ) l(e) 0 c(e) u(e)       δ δ δ e (S) e (S) e (S) e  ( M , M )  l ( e ) M 2. If ( t,s )   - ( S )    ( S ) s  S , t  S K =  + ( S ) is an st -cut      satisfying Hoffman’s condition ( ) ( ) cap ( ) u e c e K M c       e ( S ) e ( S ) There exists a circulation x in D’ with l  x  u  x(t,s) = M      x ( e ) x ( e ) x ( t , s ) M x circulation       e ( s ) e ( s ) The restriction of x to the edges of D provides an st-flow with value M

  9. Augmenting paths D = ( V,E ), capacity c  R E + , st-flow x  R E (1,4) 1 4 (1,2) (2,3) Auxiliary Graph D x = ( V,E x ) (1,1) (0,1) s t = { e  E: x e < u e }  { e -1 : e  E, 0 < x e } E x (1,3) (2,2) 2 3 (2,2) x -AUGMENTING PATH: st-path P in D x Forward edges P + = {e  E : e  E x } 1 4 P Backward edges P - = {e  E : e -1  E x } s t 2 3 D x

  10. The augmenting path theorem Theorem (augmenting path theorem ) An st -flow x is maximum if and only if D x contains no x-augmenting Hajhsas path. da Proof . ( Necessity ) By contradiction. 1 4 Suppose x is maximum and P st-path of D x P Let  + = min{ c (e)- x ( e ): e  P + } > 0 s t Let  - = min{ x ( e ): e  P - } > 0 D x 2 3  = min{  - ,  + } > 0 (1,2) 1 4 (1,2) (2,3) Send  units of flow on P. Obtain flow x’ (1,1) (0,1) s t x ( e ) if e  P (1,3) (2,2) x ( e )+  if e  P + 2 3 x’ ( e ) = (2,2) x ( e )-  if e  P -

  11. The augmenting path theorem Proof . ( Necessity ) (1,4) 1 4 (1,2) (2,3) Send  units of flow on P. Obtain flow x’ (1,1) (0,1) s t x ( e ) if e  P (1,3) (2,2) x ( e )+  if e  P + 2 3 x’ ( e ) = (2,2) x ( e )-  if e  P - 2 2 (1,2) x ' is a feasible st-flow (show it!) 1 4 (1,2) (2,3) (1,1) (0,1) s t Since P is an st-path, we have: 0 (1,3) (2,2) 2 3 2    (2,2)       val ( x ' ) x ' ( e ) x ( e ) x ( e ) val ( x )          e ( s ) e ( s ) e ( s ) and x is not maximum, a contradiction .

  12. The augmenting path theorem Proof . ( Sufficiency ) (2,4) 1 4 (2,2) (2,3) Suppose no st-path in D x (0,1) (0,1) s t Then there is an empty st -cut K =  + ( S ) in D x (2,3) (2,2) 2 3 (i.e. S = { w  V : there is a sw-path in D x } (2,2) If D = ( V,E ) contains an edge ( w,z ) with w  S to z  V\S    x wz = c wz (otherwise ( w,z )  E x ) x ( e ) c ( e )       e ( S ) e ( S ) D D If D = ( V,E ) contains an edge ( z,w ) with w  S to z  V/S   x zw = 0 (otherwise ( z,w ) -1 =( w,z )  E x ) x ( e ) 0    e ( S ) D  + ( S )        val ( x ) x ( e ) x ( e ) c ( e ) cap ( K ) 1 4 c          e ( S ) e ( S ) e ( S ) P s t x is a maximum flow and K is a minimum cut D x 2 3 S ={ s ,1,2,4}

  13. Ford-Fulkerson algorithm 1. Start with the zero flow x = 0 2. Look for an x-augmenting path P in D x 3. if P exists, then find the maximum possible increase  along P and augment x. Goto 2 . 4. if no such P exists then x is a maximum flow. A minimum st -cut is  + (S(x)) where S(x)={ w  V : there is a sw-path in D x }. The algorthm can take C iterations, where C is the maximum capacity of an edge. This is not polynomial time (why?). There are more efficient versions (polynomial in | V | and | E |).

  14. Using LP duality to prove the same things

  15. The dual of max st -flow problem    max -div x ( t ) max x x vt tv       vt ( t ) tv ( t )      x x 0 ( v V \ { s , t }) y v wv wv PRIMAL       wv ( v ) vw ( v ) (MF)   z vw x c ( vw E ) vw vw  0 x  min c vw z vw  E vw       y y z 0 ( vw E , v , w V \ { s , t }) v w vw    y z 0 ( sw E ) w sw     y z 0 ( vs E) v vs DUAL max flow     y z 1 ( tw E) w tw ( DMF )     y z 1 ( vt E) v vt   z e 0 ( e E)

  16. The dual of max st -flow problem  min c vw z vw  E vw       y y z 0 ( vw E , v , w V \ { s , t }) v w vw    y z 0 ( sw E ) w sw     y z 0 ( vs E) v vs ( DMF )     y z 1 ( tw E) w tw     1 ( y z vt E) v vt   z e 0 ( e E) By introducing y s = 0 and y t = -1 we make it less ugly  min c vw z vw  E vw    ( DMF ) y 0 , y 1 s t      y y z 0 ( vw E ) v w vw   0 ( z e e E)

  17. The dual of max st -flow problem  min c vw z vw ( DMF )  E vw    y 0 , y 1 s t      0 ( ) y y z vw E v w vw   z e 0 ( e E) ( y * ,z * ) is an optimal solution to dual if and only if ( y * + 1 ,z * ) is optimal to:  min c vw z vw ( DMF )  E vw   y 1 , y 0 s t      y y z 0 ( vw E ) v w vw   z e 0 ( e E)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend