{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

note09-1x2

# note09-1x2 - Max-Flow Problems Max-Flow is a graph problem...

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

Max-Flow Problems Max-Flow is a graph problem that seems very specific and narrowly defined. But many seemingly unrelated problems can be converted to max-flow problems. A flow network consists of: A directed graph G = ( V , E ) . Each edge u v E has a capacity c ( u , v ) 0 . (If u v E then c ( u , v ) = 0 .) Two special vertices: the source s and the sink t . For each vertex v V , there is a directed path s t passing through v . Note: The last condition is not essential. It is included here for convenience. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 76 Max-Flow: Definitions Flow Function A flow is a real valued function f : V × V R that satisfies the following conditions: Capacity Constraint: For all u , v V , f ( u , v ) c ( u , v ) . Skew Symmetry Constraint: For all u , v V , f ( v , u ) = - f ( u , v ) . Flow Conservation Constraint: For any u V - { s , t } , v V f ( u , v ) = 0 The flow value of f is defined to be: | f | = v V f ( s , v ) f ( u , v ) is called the net flow from u to v . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 3 / 76

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

View Full Document
Max-Flow: Example t v1 v2 v3 v4 11/16 8/13 12/12 15/20 11/14 4/9 7/7 4/4 1/4 -1/10 s In this figure, the notation 11 / 16 means f ( s , v 1 ) = 11 and c ( s , v 1 ) = 16 . The edges with 0 capacity are not shown. Only positive flow values are shown. (Recall that f ( v , u ) = - f ( u , v ) by the skew symmetry constraint.) The capacity constraint is satisfied at all edges. The conservation constraint at the vertex v 1 is: f ( v 1 , s ) + f ( v 1 , v 2 ) + f ( v 1 , v 3 ) + f ( v 1 , v 4 ) + f ( v 1 , t ) = - 11 + - 1 + 12 + 0 + 0 = 0 The flow value is: | f | = 11 + 8 = 19 . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 4 / 76 Max-Flow: Definition Caution In the example above, suppose that 3 units flow v 2 v 1 , and 2 units flow v 1 v 2 . It can be seen that the flow conservation and the capacity constrains are still satisfied. But are f ( v 2 v 1 ) = 3 and f ( v 2 v 1 ) = 2 ? Then the Skew Symmetry constrains f ( v 1 , v 2 ) = - f ( v 2 , v 1 ) would not be satisfied. In the formulation of the max-flow problem, shipping 3 units flow from v 2 to v 1 , and 2 units flow from v 1 to v 2 is equivalent to shipping 1 unit flow from v 2 to v 1 , and nothing from v 1 to v 2 . In other words, the 2 units flow from v 2 to v 1 , then from v 1 back to v 2 are canceled . So we have: f ( v 2 , v 1 ) = 1 and f ( v 1 , v 2 ) = - 1 c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 5 / 76
Max-Flow: Application G = ( V , E ) represents an oil pipeline system Each edge u v E is an one-directional pipeline. Each vertex is a site where the pipelines meet and the oil flow can be redistributed. c ( u , v ) is the capacity of the pipeline u v . (Namely, the amount of oils that can flow through the pipeline per unit time.) s is the source of the oil, and t is the destination of the oil. f ( u , v ) is the amount of oil flow through the line u v .

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 ]}

### Page1 / 32

note09-1x2 - Max-Flow Problems Max-Flow is a graph problem...

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

View Full Document
Ask a homework question - tutors are online