{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture_21

# lecture_21 - Introduction to Algorithms 6.046J/18.401J...

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

Introduction to Algorithms 6.046J/18.401J L ECTURE 21 Network Flow II Max-flow, min-cut theorem Ford-Fulkerson algorithm and analysis Edmonds-Karp algorithm and analysis Best algorithms to date Prof. Charles E. Leiserson

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

View Full Document
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: , c f ( p ) = min { c f ( v u )} . , ( v u ) p © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.2
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. © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.3

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

View Full Document
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. © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.4
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 . © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.5

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

View Full Document
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 . s s u u v v S T path in G f 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 ) – S , T ) = c f ( u , v ) . Summing over all u S and v T yields f ( ( S , T ) , and since | f | = f ( S , T ) , the theorem follows. © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.6
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 ) © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.7

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

View Full Document
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 : © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.8
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 0:10 9 0:10 9 0:10 9 0:1 0:10 9 G : © 2001–4 by Charles E. Leiserson Introduction to Algorithms November 29, 2004 L21.9

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern