{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 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
Image of page 3

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

View Full Document Right Arrow Icon
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
Image of page 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
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 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
Image of page 7

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

View Full Document Right Arrow Icon
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
Image of page 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
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern