Download presentation
Presentation is loading. Please wait.
Published byElmer Burns Modified over 9 years ago
1
Flow Networks zichun@comp.nus.edu.sg
2
Formalization Basic Results Ford-Fulkerson Edmunds-Karp Bipartite Matching Min-cut
3
Flow Network
4
Properties of Flow
5
Maximum Flow Value of Flow
6
Motivating Problem s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 16 10 4 12 20 9 7 4 14 13
7
Motivating Problem s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 12/12 15/20 4/9 7/7 4/4 11/14 8/13
8
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 15/20 4/9 7/7 4/4 11/14 8/13 12/12
9
Multiple Sources / Sinks s1s1 v1v1 v2v2 v3v3 v4v4 t1t1 16 10 4 12 20 9 7 4 14 13 t2t2 4 s2s2 4
10
Multiple Sources / Sinks s1s1 v1v1 v2v2 v3v3 v4v4 t1t1 16 10 4 12 20 9 7 4 14 13 t2t2 4 s2s2 4 S t
11
Implicit Summation Notation
12
Key Equalities
14
Flow Value Definition Homomorphism Flow Conservation Skew Symmetry Homomorphism Flow Conservation
15
Ford-Fulkerson
16
Residual network
17
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 15 4 11 8 4 7 5 3 0 5 3 0 0 5
18
Augmenting Path A path of non-zero weight from s to t in G f
19
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 15 4 11 8 4 7 5 3 0 5 3 0 0 5
20
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 15 4 11 8 4 7 5 3 0 5 3 0 0 5
21
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 15 4 11 8 4 7 5 3 0 5 3 0 0 5
22
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 12/12 20/20 0/9 7/7 4/4 11/14 13/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 20 4 11 13 11 0 7 0 3 0 9 3 0 0 0
23
S-T Cut
24
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/16 10 1/4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 f(S, T) = 12 – 4 + 11 = 19 c(S, T) = 12 + 14 = 26
25
Let f be a flow in a flow network G with source s and sink t, and let (S, T) be a cut of G. Then the net flow across (S, T) is f(S, T) = |f| Homomorphism Flow Conservation Homomorphism Flow Conservation Definition
26
The value of any flow f in a flow network G is bounded by the capacity of any cut of G
27
Min-Cut Max-Flow 1. f is a maximum flow in G 2.The residual network G f contains no augmenting path 3.|f|= c(S, T) for some cut (S, T) of G
28
1.Premise: f is a max-flow in G 2.Assume G f has augmenting path p 3.We can augment G f with p to get a flow f’ > f – Contradicts [1] Hence G f has no augmenting paths
30
The value of any flow f in a flow network G is bounded by the capacity of any cut of G
31
Ford-Fulkerson Termination: G f has no augmenting path iff flow is maximum
32
Run-time
33
s v1v1 v2v2 t 1 1,000,000
34
s v1v1 v2v2 t 1
35
s v1v1 v2v2 t 1 999,9991,000,000 1 1
36
s v1v1 v2v2 t 1 999,9991,000,000 1 1
37
s v1v1 v2v2 t 1 999,999 1,000,000 999,999 1 1 1 1
38
s v1v1 v2v2 t 1 1,000,000 999,999 1 1 1 1
39
Edmunds Karp Run-time: O(VE 2 )
40
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 15 4 11 8 4 7 5 3 0 5 3 0 0 5 Critical Edge
41
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 15 4 11 8 4 7 5 3 0 5 3 0 0 5 Critical Edge
42
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11 5 12 15 4 11 8 4 7 5 3 0 5 3 0 0 5
44
Since there are O(E) edges, the number of augmenting path is bounded by O(VE) [by Lemma]. Run-time: O(VE 2 )
45
Bipartite Matching
47
st
48
st
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.