Given a simple graph , we set to be the set of ordered edges of whereby we give both the orientations to an edge . In other words, implies that and we rather denote in such a case. Further, we set
(Flow ) Let (source, target). A flow from (source) to (target/sink) is a function such that
(anti-symmetry)
(Kirchoff’s node law ) for all
(Positive output at source :) .
Let be the capacity function. A flow from to is said to satisfy the capacity constraints if and we call such a flow feasible.
One can suitably define in-flow and out-flow at a vertex and show that Kirchoff’s node law implies that the in-flow and out-flow are equal at all vertices except the sink. We can further define value of a flow . Using double-counting and anti-symmetry, we derive that
So, from Kirchoff’s node law and definition of , we obtain .
Let . We call a pair a -cut if . Defining , , we can show that for any -cut and any feasible flow. Note that if , by definition. Re-iterating the above argument,
Thus, we have that for a feasible flow and so
That the converse holds is the non-trivial max-flow min-cut theorem that we will state and prove now. Since the infimum for cuts is taken over a finite set, it is trivally a minimum. Though the LHS may not always be a maximum (see Lemma 7.4 and Exercise 7.8), we refer to it as max-flow and the RHS as min-cut.
It will soon become clear that Max-flow min-cut theorem is not a single theorem but a class of theorems that can be proven under different frameworks using variants of the ideas we will use to prove the above theorem - Theorem 7.3. We say is a path if and for all .
If there exists an infinite capacity path (i.e. capacity of every edge on the path is infinite), then the max-flow is infinite and so is the min-cut. Else, the min-cut is finite and so is the max-flow.
The proof of first part follows by constructing a sequence of flows with increasing strengths. We will prove the second part alone. Let there be no infinite capcity path. We construct a finite min-cut as follows : Choose an path and since it is not infinite, there exists such that . Now repeat this procedure on and choose an edge in a path such that . Repeatedly, we can choose edges until has no path. Let be the set of vertices in the component of in and clearly . Since path exists in , we have that and hence . ∎
If the capacity function is bounded, then
Let be a sequence of feasible flows such that
Enumerate the set of edges in as . Fix an orientation for each . Since , by Bolzano-Weierstrass theorem, there exists a convergent subsequence such that . Set . Now apply the argument to the sequence of flows on . This way we get a limit and set . Continuing, we get for all . This is nothing but a diagonalization argument and so we have constructed a subsequence such that for all . Thus, we have that
i.e., is the maximal element. ∎
Let be a flow in a graph and let be a path. Then for every , defined as follows is also a flow : for , , . Further .
Clearly anti-symmetry holds and . It remains only to show that for all . This holds trivially for all . Suppose for some . Then
∎
We first present the Ford-Fulkerson algorithm which gives the idea of the proof.
Given a flow , define the residual capacity
Step 1: Set .
Step 2 : If there is a path (called -augmenting path from to in such that for all edges , then go to Step 3 else go to Step 6.
Step 3 : Find (residual capacity).
Step 4 : For each edge , set and .
Step 5 : Go back to Step 2.
Step 6 : Output flow as the maximal flow.
Defining be the set of vertices that can be reached from with a path such that for all edges , note that Step 2 can also be rephrased as follows : If go to Step 3 else go to Step 6.
(Theorem 7.3) Suppose that the capacity function is bounded. We will prove the theorem under this assumption and then argue the other case.
Let be the max-flow whose existence is guaranteed by Lemma 7.5. Define
If , then is as cut. Also, if , then as otherwise which is a contradiction. As we argued before and by the zero residular property of edges in , we have that
and so the theorem is proved as we already have the inequality.
If , then there is a positive residual path . If we increase the capacity along the path by as in Lemma 7.6 and define a new flow then . This will contradict the maximality of if we show that it satisfies the capacity constraints. Trivially, the capacity constraint is satisfied for all as the for all . If , then . If , then and so the capacity constraint is satisfied everywhere and the proof is complete.
Now let us assume that the capacity function is unbounded. But since the min-cut is finite, choose a cut such that . Define such that . Observe that the min-cut under is same as that in . Further, if a flow is feasible w.r.t then it is feasible w.r.t. as well. Since is a bounded capacity function, we have a max-flow such that min-cut under . But then, it also holds that min-cut under and is feasible under as well. ∎
The last part of the proof shows that Lemma 7.5 holds under the assumption of finite min-cut alone i.e., the assumption of bounded capacity can be relaxed considerably. Give a direct proof of this without using Max-flow Min-cut theorem.
Assume that the min-cut is finite. F-F Algorithm terminates if the capacities are integral and also gives that if capacities are integral, there is an integral maximal flow.
If capacities are integral, the min-cut is integral and so is the max-flow. At evey step the F-F algorithm increases the flow strength by at least one as the residual capacity along any augmenting path is a positive integer . Since the max-flow is finite, in finitely many steps the algorithm outputs the max flow.
The algorithm starts with and at every step, the flow on any edge is increased/decreased by the residual capcity if the edge is in a -augmenting path. Since the residual capacity is integral, the flow is always integral and so is the max-flow. ∎
The F-F algorithm need not terminate when capacities are non-integral and here is an example. See https://en.wikipedia.org/wiki/Ford_Fulkerson_algorithm#Non-terminating_example
The definition of a flow can be extended to multiple sources and targets. Let be the sources and sinks respectively. The definition of flow can be modified by requiring the Kirchoff’s node law to hold for all and positive output at i.e., . An cut is such that . We again have a max-flow min-cut theorem as follows.
Let us again assume that the min-cut is finite i.e., there is no infinite capacity path. The trivial inequality follows as in the original theorem and also the fact that the supremum is maximum. To argue the equality, instead of repeating the proof, we shall use a reduction. Define as follows : . Set the capacity of the new edges to be infinite. Note that any cut in is a cut in . Further, any cut involving edges in has infinite capacity. Hence the min cut in and are equal.
If is a flow in , let be the restriction of to . Clearly is skew-symmetric and satisfies Kirchoff’s node law. We verify the last condition as follows : By Kirchoff’s node law in , we have that
Thus, and so the max-flow in is equal to the max-flow in . Hence the theorem follows from the single-source single-sink max-flow min-cut theorem. ∎
A more general version of max-flow min-cut theorem is as follows : Let be a directed graph i.e., does not imply that . Let and be a capacity constraint function. Here even if , . Then is a flow if
for all (conservation of flow / Kirchoff’s node law).
. (flow strength is non-negative.)
As before, we say that is a feasible flow (i.e., satisfies capacity constraint ) if for all , . As before, a subset is a directed cut if . Further capcity of a cut is defined as
(Max-flow min-cut theorem for directed graphs.) Under the notation as above, we have that
Proof Sketch : The case of infinite min-cut and infinite capacities can be handled as in the undirected version. So let us assume that capacity is bounded i.e., .
An -augmenting path is a path such that for each either (i) or (ii) . In simple words, either the ‘forward’ edges are not of full capacity or the ‘backward’ edges have positive flow. Define in Case (i) and in Case (ii). If both cases hold, pick one arbitarily as . As before set . Show that the flow can be increased by adding to the ‘forward’ edges and subtracting from the ‘backward’ edges. Now use the proof idea of Theorem 7.3 to complete the proof.
A general version of max-flow min-cut theorem is stated in the exercises.
Use max-flow min-cut theorem for directed graphs to show the undirected version.
What is the equivalent of Ford-Fulkerson algorithm for flows on directed graphs.
Does the F-F algorithm terminate is the capacities are rational ?