Você está na página 1de 93

Flow Networks

05 — 08 — 2009

Sören Wellhöfer
Introduction
Definitions
Problems / Solutions
References

Table of Contents

1 Introduction

2 Definitions

3 Problems / Solutions

4 References

Sören Wellhöfer Flow Networks


Introduction
Definitions
Problems / Solutions
References

Flow network

Abstract
• Directed graph
• Source s and sink t

Sören Wellhöfer Flow Networks


Introduction
Definitions
Problems / Solutions
References

Flow network

a
Abstract
• Directed graph
• Source s and sink t s t
• Edges have capacity

Sören Wellhöfer Flow Networks


Introduction
Definitions
Problems / Solutions
References

Flow network

a
Abstract 1
5
• Directed graph
• Source s and sink t s 3 t
• Edges have capacity
• Flow: s → t 2 5
b

Sören Wellhöfer Flow Networks


Introduction
Definitions
Problems / Solutions
References

Flow network

a
Abstract 1
5
• Directed graph
• Source s and sink t s 3 t
• Edges have capacity
• Flow: s → t 2 5
b

Sören Wellhöfer Flow Networks


Introduction
Definitions
Problems / Solutions
References

Flow network

a
Abstract 1/1
3/5
• Directed graph
• Source s and sink t s 2/ 3 t
• Edges have capacity
• Flow: s → t 2/2 4/ 5
• Flow from s b
equals flow into t

Sören Wellhöfer Flow Networks


Introduction
Definitions
Problems / Solutions
References

Flow network

a
Abstract 1/1
3/5
• Directed graph
• Source s and sink t s 2/ 3 t
• Edges have capacity
• Flow: s → t 2/2 4/ 5
• Flow from s b
equals flow into t

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Formal definition

Nf = G (V , E )

V u, v ∈ V Set of vertices (nodes)

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Formal definition

Nf = G (V , E )

V u, v ∈ V Set of vertices (nodes)


(u, v ) ∈ E Set of edges (arcs)

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Formal definition

Nf = G (V , E )

V u, v ∈ V Set of vertices (nodes)


(u, v ) ∈ E Set of edges (arcs)
c(u, v ) Real-valued edge capacity

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Formal definition

Nf = G (V , E )

V u, v ∈ V Set of vertices (nodes)


(u, v ) ∈ E Set of edges (arcs)
c(u, v ) Real-valued edge capacity
f (u, v ) Net-flow from u to v

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Formal definition

Nf = G (V , E )

V u, v ∈ V Set of vertices (nodes)


(u, v ) ∈ E Set of edges (arcs)
c(u, v ) Real-valued edge capacity
f (u, v ) Net-flow from u to v
s, t ∈ V Source and sink

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Formal definition

Nf = G (V , E )

V u, v ∈ V Set of vertices (nodes)


(u, v ) ∈ E Set of edges (arcs)
c(u, v ) Real-valued edge capacity
f (u, v ) Net-flow from u to v
s, t ∈ V Source and sink

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network Properties

Capacity constraints

0 ≤ f (u, v ) ≤ c(u, v )

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network Properties

Capacity constraints

0 ≤ f (u, v ) ≤ c(u, v )

Skew symmetry

f (u, v ) = −f (v , u)

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network Properties

Capacity constraints

0 ≤ f (u, v ) ≤ c(u, v )

Skew symmetry

f (u, v ) = −f (v , u)

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Properties
Flow conservation
P
u∈V f (u, w ) = 0,
if u 6= s ∧ u 6= t

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Properties
Flow conservation
P
u∈V f (u, w ) = 0,
if u 6= s ∧ u 6= t

Net flow to node = 0

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Properties
Flow conservation
P
u∈V f (u, w ) = 0,
if u 6= s ∧ u 6= t

Net flow to node = 0

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Properties
Flow conservation
P
u∈V f (u, w ) = 0,
if u 6= s ∧ u 6= t

Net flow to node = 0

3 1
n

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Properties
Flow conservation
P
u∈V f (u, w ) = 0,
if u 6= s ∧ u 6= t

Net flow to node = 0

3 -1
n

-2

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Properties
Flow conservation
P
u∈V f (u, w ) = 0,
if u 6= s ∧ u 6= t

Net flow to node = 0

3 -1
n

P -2
=0
Sören Wellhöfer Flow Networks
Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Capacity of a Path

a
5 1

s 3 t

2 5
b

p = (s, a, b, t)

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Capacity of a Path

a
5 1

s 3 t

2 5
b

p = (s, a, b, t)
c(p) = min(c(s, a), c(a, b), c(b, t))

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Capacity of a Path

a
5 1

s 3 t

2 5
b

p = (s, a, b, t)
c(p) = min(c(s, a), c(a, b), c(b, t))

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Capacity of a Path

a
5 1

s 3 t

2 5
b

p = (s, a, b, t)
c(p) = min(c(s, a), c(a, b), c(b, t))
c(p) = min(5, 3, 5)

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Capacity of a Path

a
5 1

s 3 t

2 5
b

p = (s, a, b, t)
c(p) = min(c(s, a), c(a, b), c(b, t))
c(p) = min(5, 3, 5) = 3

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Capacity of a Path

a
5 1

s 3 t

2 5
b

p = (s, a, b, t)
c(p) = min(c(s, a), c(a, b), c(b, t))
c(p) = min(5, 3, 5) = 3

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v )

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

a
3/5 1/1

s 2/3 t

2/2 4/5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

a
3/5 1/1
-3
s 2/3 t

2/2 4/5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

a
3/5 1/1
-3 -1
s 2/3 -2 t
-2 -4
2/2 4/5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

a
2 0
3 1
s 1 3 t
2 4
0 1
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

a
2 0
Augmenting path:
3 1
pa = (s, a, b, t)
s 1 3 t
2 4
0 1
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

a
2 0
Augmenting path:
3 1
pa = (s, a, b, t)
s 1 3 t
2 4 cr (pa ) = min(2, 1, 1) = 1
0 1
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Residual Network
Nr = Gr (V , Er ) Er ... residual edges
cr (u, v ) = c(u, v ) − f (u, v ) ... residual edge capacity

a
2 0
Augmenting path:
3 1
pa = (s, a, b, t)
s 1 3 t
2 4 cr (pa ) = min(2, 1, 1) = 1
0 1
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

a
5 1

s 3 t

2 5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

a
5 1

s 3 t

2 5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

a
5 1

s 3 t
S
2 5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

a
Cut Capacity:
5 1
P
c(S, T ) = u∈S∧v ∈T c(u, v )
s 3 t
S T =G −S
2 5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

a
Cut Capacity:
5 1
P
c(S, T ) = u∈S∧v ∈T c(u, v )
s 3 t
c(S, T ) = 5 + 5 = 10
S T =G −S
2 5
b

Sören Wellhöfer Flow Networks


Formal definition
Introduction
Network Properties
Definitions
Path capacity
Problems / Solutions
Residual network
References
Network cuts

Network cut
Partition of G into two sets S and T s ∈S ∧t ∈T

a
Cut Capacity:
5 1
P
c(S, T ) = u∈S∧v ∈T c(u, v )
s 3 t
c(S, T ) = 5 + 5 = 10
S T =G −S
2 5
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Maximum Flow

Flow at max if no augmenting paths in G

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Maximum Flow

Flow at max if no augmenting paths in G

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Maximum Flow

Flow at max if no augmenting paths in G

a
3/5 1/1

s 2/3 t

2/2 4/5
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Maximum Flow

Flow at max if no augmenting paths in G

a
2 0
3 1
s 1 3 t
2 4
0 1
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Maximum Flow

Flow at max if no augmenting paths in G

a
2 0
3 1
s 1 3 t
2 4
0 1
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Maximum Flow

Flow at max if no augmenting paths in G

a
1 0
3 1
s 0 3 t
2 4
0 0
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Maximum Flow

Flow at max if no augmenting paths in G

a
4/5 1/1

s 3/3 t

2/2 5/5
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

• 1956, L. Ford and D. Fulkerson

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

• 1956, L. Ford and D. Fulkerson


• Compute maximum flow of Nf in O(|E | · f )

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

• 1956, L. Ford and D. Fulkerson


• Compute maximum flow of Nf in O(|E | · f )
• Might not find max flow
• Termination not guaranteed

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

• 1956, L. Ford and D. Fulkerson


• Compute maximum flow of Nf in O(|E | · f )
• Might not find max flow
• Termination not guaranteed

Idea:
While there exist augmenting paths,
increase flow along those.

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

• 1956, L. Ford and D. Fulkerson


• Compute maximum flow of Nf in O(|E | · f )
• Might not find max flow
• Termination not guaranteed

Idea:
While there exist augmenting paths,
increase flow along those.

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

· compute cr (pa )

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

· compute cr (pa )
· ∀(u, v ) ∈ pa

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

· compute cr (pa )
· ∀(u, v ) ∈ pa
f (u, v ) += cr (pa )

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

· compute cr (pa )
· ∀(u, v ) ∈ pa
f (u, v ) += cr (pa ) (forward arc)

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

· compute cr (pa )
· ∀(u, v ) ∈ pa
f (u, v ) += cr (pa ) (forward arc)
f (v , u) -= cr (pa )

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

· compute cr (pa )
· ∀(u, v ) ∈ pa
f (u, v ) += cr (pa ) (forward arc)
f (v , u) -= cr (pa ) (backward arc)

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm

Initialization
∀(u, v ) ∈ E → f (u, v ) = 0
Augmentation
while ∃pa ∈ Gr (there exist augmenting paths)

· compute cr (pa )
· ∀(u, v ) ∈ pa
f (u, v ) += cr (pa ) (forward arc)
f (v , u) -= cr (pa ) (backward arc)

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm Demo

a
0/5 0/1

s 0/3 t

0/2 0/5
b

P P
f (s, t) = u∈V f (s, u) = u∈V f (u, t)
=0

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm Demo

a
1/5 1/1

s 0/3 t

0/2 0/5
b

P P
f (s, t) = u∈V f (s, u) = u∈V f (u, t)
=1

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm Demo

a
4/5 1/1

s 3/3 t

0/2 3/5
b

P P
f (s, t) = u∈V f (s, u) = u∈V f (u, t)
=4

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm Demo

a
4/5 1/1

s 3/3 t

2/2 5/5
b

P P
f (s, t) = u∈V f (s, u) = u∈V f (u, t)
=6

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Ford-Fulkerson Algorithm Demo


a
4/5 1/1

s 3/3 t

2/2 5/5
b

P P
f (s, t) = u∈V f (s, u) = u∈V f (u, t)
fmax (s, t) = 6

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Minimum-cut Maximum-flow theorem


• Minimum cut: cut of smallest capacity c(S, T ) = min

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Minimum-cut Maximum-flow theorem


• Minimum cut: cut of smallest capacity c(S, T ) = min

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Minimum-cut Maximum-flow theorem


• Minimum cut: cut of smallest capacity c(S, T ) = min

a
5 1

s 3 t

2 5
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Minimum-cut Maximum-flow theorem


• Minimum cut: cut of smallest capacity c(S, T ) = min

a
5 1

s 3 t

2 5
b

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Minimum-cut Maximum-flow theorem


• Minimum cut: cut of smallest capacity c(S, T ) = min

a
5 1

s 3 t

2 5
b

cmin (S, T ) = 5 + 1 = 6
Sören Wellhöfer Flow Networks
Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Minimum-cut Maximum-flow theorem


• Minimum cut: cut of smallest capacity c(S, T ) = min

a
4/5 1/1

s 3/3 t

2/2 5/5
b

fmax (s, t) = cmin (S, T ) = 6


Sören Wellhöfer Flow Networks
Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Summary

• Directed graph, capacities, flow


• Residual network, network cuts

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Summary

• Directed graph, capacities, flow


• Residual network, network cuts
• Maximum flow, Ford-Fulkerson algorithm,
Min-cut Max-flow theorem

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Summary

• Directed graph, capacities, flow


• Residual network, network cuts
• Maximum flow, Ford-Fulkerson algorithm,
Min-cut Max-flow theorem

Practical applications

• Pipe networks

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Summary

• Directed graph, capacities, flow


• Residual network, network cuts
• Maximum flow, Ford-Fulkerson algorithm,
Min-cut Max-flow theorem

Practical applications

• Pipe networks
• Traffic flow modeling

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Summary

• Directed graph, capacities, flow


• Residual network, network cuts
• Maximum flow, Ford-Fulkerson algorithm,
Min-cut Max-flow theorem

Practical applications

• Pipe networks
• Traffic flow modeling
• Commodity/Market flow

Sören Wellhöfer Flow Networks


Introduction
Definitions Maximum Flow
Problems / Solutions Ford-Fulkerson Algorithm
References

Summary

• Directed graph, capacities, flow


• Residual network, network cuts
• Maximum flow, Ford-Fulkerson algorithm,
Min-cut Max-flow theorem

Practical applications

• Pipe networks
• Traffic flow modeling
• Commodity/Market flow

Sören Wellhöfer Flow Networks


Graph Theory
Bondy, Murty
Graduate Texts in Mathematics, Springer, 2008
Graphs, Flows, and the Ford-Fulkerson Algorithm
Vince Vatter, 2004
Network flows
Kevin Weyn, 2005
A simple Min-cut algorithm
Mechthild Stoer, Frank Wagner
Freie Universität Berlin, 1997
Flow network, Ford-Fulkerson algorithm, Maximum-flow
minimum-cut theorem
Wikipedia, [http://en.wikipedia.org/wiki], 2009
Introduction
Definitions
Problems / Solutions
References

Flow Networks

05 — 08 — 2009

Sören Wellhöfer

Sören Wellhöfer Flow Networks

Você também pode gostar