possible cuts in a graph. The capacity of a cut is
the sum of the capacity of all the edges crossing the cut, from the region to the region .
The following three conditions are equivalent:
- is a maximum flow in
- The residual network contains no augmenting paths.
- for some cut .
Proof sketch: If there is an augmenting path, we can send flow along it, and get a greater flow, hence it cannot be maximal. If there is no augmenting path, divide the graph into , the nodes reachable from in the residual network, and , those not reachable. Then in the residual network must be 0. If it is not, there is an edge with . But then is reachable from , and cannot be in .
In particular this proves that max flow min cut, since max flow
We also have max flow min cut because given any flow, , and any cut, , we can sum the equations of conservation of flow at every point of to show that |f| = the flow of f along edges joining S and T which is
no more than .
The max-flow min-cut problem can be easily expressed as a pair of primal-dual linear programs. The following linear program computes the max flow between nodes S and T in graph G=(V, E), where V is the set of nodes and E is the set of edges. The capacity of any edge is represented by . The linear program assumes the graph to be directed. The linear program for the undirected case can be easily derived from the same.
Primal (Max flow linear program)
The linear program computes the max flow in the variable . is a conceptual link. As there is flow conservation (flow in equals flow out) at every node, the more flow that is on this conceptual link, the more will be the flow between the source and the destination. The first constraint specifies the flow conservation at every node except the source and the destination. The second and third constraints are special flow conservation constraints for the destination and the source respectively. The final constraint limits the maximum flow on the edge to its capacity. The variable shown right at the end of every constraint is the corresponding dual variable.
An interesting fact about the above linear program is that the constraint matrix is totally unimodular. This means that, if all the inputs are integral, there exists as an integral solution. So, if all the capacities in the graph are integral, the max flow is integral.
Dual (Min cut linear program)
The dual can be written mechanically from the primal based on the duality theorem in linear programming. In the dual, the variable decides whether an edge is a cut edge are not. The edges for which are part of the min cut and the edges for which it is 0 are not part of the cut edge. The nodes in the graph that are along with the node S after the cut can be considered to be one partition and the nodes in the graph that are with the node T can be considered to be another partition. The constraints represent the relationship between the nodes in different sets. To illustrate this, consider an example where the solution is such that the value of p for the nodes in the partition containing S is 0 and 1 otherwise. It is now obvious to see that the value of x for the cut edges is 1 and for the rest it is 0. This will also help in understanding the meaning of the constraints. Finally, as in the primal, the variable shown right at the end of every constraint is the corresponding primal variable.
One of the interesting relationships between the primal and dual is that the objective value of optimal solutions for the primal and the dual are exactly same. Thus, since the objective value of the primal is integral, the dual will also have an integral objective value. Thus, if all the input capacities are integral, the min cut is integral.
Given to the right is a network with nodes , and a total flow from the source to the sink of 5, which is maximal in this network. (Incidentally, this is the only maximal flow you can assign to this network.)
There are three minimal cuts in this network:
|| Capacity |
Notice that is not a minimal cut, even though both and are saturated in the given flow. This is because in the residual network , there is an edge (r,q) with capacity .
The theorem was proved by P. Elias, A. Feinstein, and C.E. Shannon in 1956, and independently also by L.R. Ford, Jr. and D.R. Fulkerson in the same year. Determining maximum flows is a special kind of linear programming problem, and the max flow min cut theorem can be seen as a special case of the duality theorem for linear programming.
- P. Elias, A. Feinstein, and C. E. Shannon. Note on maximum flow through a network. IRE Transactions on Information Theory IT-2, 117—119, 1956.
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Chapter 26: Maximum Flow, pp.643–700.