17-max-flow-2-handout.pdf

# 17-max-flow-2-handout.pdf - Defining Flows I CMPSCI 311...

• 4

This preview shows 1 out of 3 pages.

CMPSCI 311: Introduction to Algorithms Lecture 17: Network Flows II Akshay Krishnamurthy University of Massachusetts Last Compiled: April 4, 2018 Defining Flows Flow network Directed graph Source node s and target node t Edge capacities c ( e ) 0 Flow Capacity Constraints: 0 f ( e ) c ( e ) on each edge Conservation Constraints: f in ( s ) = 0 , f out ( t ) = 0 , v V \{ s, t } f in ( v ) = f out ( v ) where f in ( v ) = e in to v f ( e ) and f out ( v ) = e out of v f ( e ) Max flow problem: find a flow of maximum value v ( f ) = f out ( s ) Capacity/Flow v 1 v 2 v 3 v 4 t s 16/11 13/8 14/11 9/4 12/12 4/1 7/7 20/15 4/4 Residual Graph Residual graph: data structure to identify opportunities to push more flow on edges with leftover capacity or undo flow on edges already carrying flow. Original edge e = ( u, v ) E Flow f ( e ) Capacity c ( e ) Forward residual edge e = ( u, v ) residual capacity c ( e ) - f ( e ) Backward residual edge if f ( e ) > 0 , create edge e = ( v, u ) residual capacity f ( e ) Residual Graph Residual graph G f with respect to flow f = graph of all forward and backward residual edges with positive residual capacity. Capacity v 1 v 2 v 3 v 4 t s 16 13 14 9 12 4 7 20 4

Subscribe to view the full document.

Capacity/Flow v 1 v 2 v 3 v 4 t s 16/11 13/8 14/11 9/4 12/12 4/1 7/7 20/15 4/4 Residual Graph v 1 v 2 v 3 v 4 t s 11 5 5 8 3 1 5 4 3 11 7 5 15 4 12 Augmenting Path Revised Idea : use paths in the residual graph to augment flow Augment( f , P ) Let b = bottleneck( P , f ) least residual capacity in P for edge e = ( u, v ) in P do if e is a forward edge then f ( e ) = f ( e ) + b increase flow on forward edges else f ( e ) = f ( e ) - b decrease flow on backward edges end if end for Ford-Fulkerson Algorithm Repeatedly find augmenting paths in the residual graph and use them to augment flow!
You've reached the end of this preview.
• Fall '09
• Flow network, Maximum flow problem, Max-flow min-cut theorem

{[ 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