Mincut problem
Def. A st-cut (cut) is a partition of the vertices into two disjoint sets, with s in one set A and t in the other set B.
Def. Its capacity is the sum of the capacities of the edges from A to B.
Minimum st-cut (mincut) problem. Find a cut of minimum capacity.
Maxflow problem
Def. An st-flow (flow) is an assignment of values to the edges such that:
- Capacity constraint: 0 <= flow <= capacity
- Local equilibrium: inflow == outflow at every vertex (except s and t).
Maximum st-flow (maxflow) problem. Find a flow of maximum value. (from s to t)
Mincut and maxflow are dual problem (the same problem)!
Ford-Fulkerson Algorithm
- Start with 0 flow.
- While there exists an augmenting path:
- find an augmenting path
- Shortest path (BFS)
- Fattest path (priority queue)
- compute bottleneck capacity
- increase flow on that path by bottleneck capacity
- find an augmenting path