Maximum Flow Problem
- Concepts
- Residual networks, Gf=(V,Ef), with residual capacity to reflect how
the flow can be increased or decreased.
cf(u,v)=⎩⎨⎧c(u,v)−f(u,v),f(v,u),0,(u,v)∈E,(v,u)∈E,otherwise
Ef={(u,v)∈V×V:cf(u,v)>0}
- f↑f′:V×V→R, the augmentation of flow f by
f′ (flow in the residual network)
(f↑f′)(u,v)={f(u,v)+f′(u,v)−f′(v,u),0,(u,v)∈E,otherwise
- This yields a flow with greater value: ∣f↑f′∣=∣f∣+∣f′∣
- augmenting path in residual network
fp(u,v):V×V→R={cf(p),0(u,v)∈p
- Ford-Fulkerson method
- Initialize flow f=0
- While there exists an augmenting path p in residual network Gf
- Augment flow f along p
- O(E) at each iteration
f(S,T)=u∈S∑v∈T∑f(u,v)−u∈S∑v∈T∑f(v,u)
c(S,T)=u∈S∑v∈T∑c(u,v)
- Max-flow min-cut theorem: ∣f∣=c(S,T) is max flow, where Gf contains no
augmenting paths
- How to find the augmenting path?
- with BFS and choose one with fewest edges: Edmonds-Karp algorithm.
Total runtime is O(VE2).