# lecture23 - Introduction to Algorithms...

This preview shows pages 1–10. Sign up to view the full content.

Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 23 Prof. Charles E. Leiserson

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Introduction to Algorithms Day 40 L23.2 © 2001 by Charles E. Leiserson Recall from Lecture 22 Flow value: | f | = f ( s , V ) . Cut: Any partition ( S , T ) of V such that s S and t T . Lemma. | f | = f ( S , T ) for any cut ( S , T ) . Corollary. | f | c ( S , T ) for any cut ( S , T ) . Residual graph: The graph G f = ( V , E f ) with strictly positive residual capacities c f ( u , v ) = c ( u , v ) – f ( u , v ) > 0 . Augmenting path: Any path from s to t in G f . Residual capacity of an augmenting path: )} , ( { min ) ( ) , ( v u c p c f p v u f = .
Introduction to Algorithms Day 40 L23.3 © 2001 by Charles E. Leiserson Max-flow, min-cut theorem Theorem. The following are equivalent: 1. | f | = c ( S , T ) for some cut ( S , T ) . 2. f is a maximum flow. 3. f admits no augmenting paths. Proof. ( 1 ) ( 2 ): Since | f | c ( S , T ) for any cut ( S , T ) (by the corollary from Lecture 22), the assumption that | f | = c ( S , T ) implies that f is a maximum flow. ( 2 ) ( 3 ): If there were an augmenting path, the flow value could be increased, contradicting the maximality of f .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Introduction to Algorithms Day 40 L23.4 © 2001 by Charles E. Leiserson Proof (continued) ( 3 ) ( 1 ): Suppose that f admits no augmenting paths. Define S = { v V : there exists a path in G f from s to v } , and let T = V S . Observe that s S and t T , and thus ( S , T ) is a cut. Consider any vertices u S and v T . We must have c f ( u , v ) = 0 , since if c f ( u , v ) > 0 , then v S , not v T as assumed. Thus, f ( u , v ) = c ( u , v ) , since c f ( u , v ) = c ( u , v ) – f ( u , v ) . Summing over all u S and v T yields f ( S , T ) = c ( S , T ) , and since | f | = f ( S , T ) , the theorem follows. s s u u v v ST path in G f
Introduction to Algorithms Day 40 L23.5 © 2001 by Charles E. Leiserson Ford-Fulkerson max-flow algorithm Algorithm: f [ u , v ] 0 for all u , v V while an augmenting path p in G wrt f exists do augment f by c f ( p ) Can be slow: s s t t 10 9 10 9 10 9 1 10 9 G :

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Introduction to Algorithms Day 40 L23.6 © 2001 by Charles E. Leiserson Ford-Fulkerson max-flow algorithm Can be slow: s s t t 0:10 9 0:10 9 0:10 9 0:1 0:10 9 G : Algorithm: f [ u , v ] 0 for all u , v V while an augmenting path p in G wrt f exists do augment f by c f ( p )
Introduction to Algorithms Day 40 L23.7 © 2001 by Charles E. Leiserson Ford-Fulkerson max-flow algorithm Can be slow: s s t t 0:10 9 0:10 9 0:10 9 0:1 0:10 9 G : Algorithm: f [ u , v ] 0 for all u , v V while an augmenting path p in G wrt f exists do augment f by c f ( p )

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Introduction to Algorithms Day 40 L23.8 © 2001 by Charles E. Leiserson Ford-Fulkerson max-flow algorithm Can be slow: s s t t 1:10 9 0:10 9 1:10 9 1:1 0:10 9 G : Algorithm: f [ u , v ] 0 for all u , v V while an augmenting path p in G wrt f exists do augment f by c f ( p )
Introduction to Algorithms Day 40 L23.9 © 2001 by Charles E. Leiserson Ford-Fulkerson max-flow algorithm Can be slow: s s t t 1:10 9 0:10 9 1:10 9 1:1 0:10 9 G : Algorithm: f [ u , v ] 0 for all u , v V while an augmenting path p

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/26/2009 for the course CS 1 taught by Professor Several during the Fall '09 term at Institute of Management Technology.

### Page1 / 26

lecture23 - Introduction to Algorithms...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online