Download Section 4-2b

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Derivation of the Navier–Stokes equations wikipedia , lookup

Boundary layer wikipedia , lookup

Hydraulic machinery wikipedia , lookup

Wind-turbine aerodynamics wikipedia , lookup

Hydraulic jumps in rectangular channels wikipedia , lookup

Water metering wikipedia , lookup

Navier–Stokes equations wikipedia , lookup

Lift (force) wikipedia , lookup

Bernoulli's principle wikipedia , lookup

Computational fluid dynamics wikipedia , lookup

Flow measurement wikipedia , lookup

Reynolds number wikipedia , lookup

Compressible flow wikipedia , lookup

Turbulence wikipedia , lookup

Flow conditioning wikipedia , lookup

Aerodynamics wikipedia , lookup

Fluid dynamics wikipedia , lookup

Rheology wikipedia , lookup

Transcript
Section 4.2 Network Flows
By Christina Touhey
Recall from last class
•
•
The flow out of a equals the flow into z.
Algorithm
1. Make vertex a: (0, ).
2. Scan the first vertex and check each incoming and
outgoing edge and label if they are unlabeled.
3. Choose another labeled vertex to scan and label.
4. Find an a-z chain K of slack edges by backtracking.
5. Increase the flow in the edges of K by  ( z ) units.
b
10
12
d
8
Example: Find the maximal a-z
flow in the network.
5
L1  a  b  d  z
a
L2  a  c  e  z
z
4
10
L3  a  b  e  z
18
12
c
(a  ,3) b
12,9
e
d (b  ,3)
10,5
8,0
( ,  )
b
5
d
3
8
5,5
Slack
a
a
z
z
4
4,4
10,10
18,14
c
12,10
e
5 L1  10 L 2  4 L3
2
c
e
P  {a, b, d }
Max Flow=19
Theorem 3
• For any given a-z flow , a finite number of
applications of the augmenting flow
algorithm yields a maximum flow.
• If P is the set of vertices labeled during the
final application of the algorithm ( P , P )
then is a minimal a-z cut set.
Proof of Theorem 3
• If  is the current flow and  k is the
augmenting a-z unit flow chain, we must
show the new flow  + m k is a legal flow.
•  and  k satisfy flow conditions:
 (e)  0 if e  In(a ) or e  Out( z )
For x  a or z ,

eIn(x )
and are integer valued.
 (e) 

eOut(x )
 ( e)
Proof of Theorem 3 (cont.)
• Where m and  ( z ) is the amount of
additional flow that can be sent from a-z.
m  ( z ) is the minimum slack, so   m k
satisfies the flow condition.
Proof of Theorem 3 (cont.)
• Since m is a positive integer, each new flow
is increased.
• The capacities and the number of edges are
finite, so eventually z is not labeled.
• Let P be the set of labeled vertices when z is
not labeled.
• Clearly ( P, P ) is an a-z cut since a is labeled
and z is not.
Proof of Theorem 3 (cont.)
• There is no unsaturated edge from labeled vertex p
to unlabeled vertex q or else it would have been
previously labeled.
• Therefore there is no flow between q and p
because k ( P, P) is maximal.
The value of the final flow equals k ( P, P)
and is maximal.
( P, P) is a minimal a  z cut.
Max Flow-Min Cut Theorem
• In a directed flow network, the value of a
maximal a-z flow is equal to the capacity of
a minimal a-z cut.
For Class to try
• Find a maximal flow from a to z in the
network. Give a minimal capacity a-z cut.
b
10
30
a
5
10
5
20
20 d
5
20
c
10
L1  a  b  e  z
e
10
30
10
f 30
10
g
20
z
L2  a  c  g  z
L3  a  g  f  z
L4  a  b  d  e  f  z
L5  a  b  d  f  z
10 L1  20 L 2  10 L3  5 L 4  5 L5
(a  ,10)
(d  ,5)
b
30,20
( ,  ) a
e
10,10
10,10 10,5
20,0
20,20
5,5
5,5

d (c ,10)5,0
20,0
c
(b ,10)
30,20
10,10
f 30,20
z
10,10 20,20
g
(c  ,10)
10,10
Max Flow=50
P  { f , z}  50