Flow Networks
Formalization Basic Results Ford-Fulkerson Edmunds-Karp Bipartite Matching Min-cut
Flow Network
Properties of Flow
Maximum Flow Value of Flow
Motivating Problem s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse
Motivating Problem s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 15/20 4/9 7/7 4/4 11/14 8/13 12/12
Multiple Sources / Sinks s1s1 v1v1 v2v2 v3v3 v4v4 t1t t2t2 4 s2s2 4
Multiple Sources / Sinks s1s1 v1v1 v2v2 v3v3 v4v4 t1t t2t2 4 s2s2 4 S t
Implicit Summation Notation
Key Equalities
Flow Value Definition Homomorphism Flow Conservation Skew Symmetry Homomorphism Flow Conservation
Ford-Fulkerson
Residual network
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse
Augmenting Path A path of non-zero weight from s to t in G f
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 20/20 0/9 7/7 4/4 11/14 13/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse
S-T Cut
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 f(S, T) = 12 – = 19 c(S, T) = = 26
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
The value of any flow f in a flow network G is bounded by the capacity of any cut of G
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
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
The value of any flow f in a flow network G is bounded by the capacity of any cut of G
Ford-Fulkerson Termination: G f has no augmenting path iff flow is maximum
Run-time
s v1v1 v2v2 t 1 1,000,000
s v1v1 v2v2 t 1
s v1v1 v2v2 t 1 999,9991,000,
s v1v1 v2v2 t 1 999,9991,000,
s v1v1 v2v2 t 1 999,999 1,000, ,
s v1v1 v2v2 t 1 1,000, ,
Edmunds Karp Run-time: O(VE 2 )
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse Critical Edge
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse Critical Edge
s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse
Since there are O(E) edges, the number of augmenting path is bounded by O(VE) [by Lemma]. Run-time: O(VE 2 )
Bipartite Matching
st
st