In computer science and optimization theory, the max-flow min-cut theorem states that in a flow network, the maximum amount of flow passing from the source to the sink is equal to the total weight of the edges in a minimum cut, i.e., the smallest total weight of the edges which if removed would disconnect the source from the sink.
For example, imagine a network of pipes carrying water from a reservoir (the source) to a city (the sink).
Each pipe has a capacity representing the maximum amount of water that can flow through it per unit of time.
The max-flow min-cut theorem tells us that the maximum amount of water that can reach the city is limited by the smallest total capacity of any set of pipes that, if cut, would completely isolate the reservoir from the city.
The capacity constraint then says that the volume flowing through each edge per unit time is less than or equal to the maximum capacity of the edge, and the conservation constraint says that the amount that flows into each vertex equals the amount flowing out of each vertex, apart from the source and sink vertices.
The other half of the max-flow min-cut theorem refers to a different aspect of a network: the collection of cuts.
An s-t cut C = (S, T) is a partition of V such that s ∈ S and t ∈ T. That is, an s-t cut is a division of the vertices of the network into two parts, with the source in one part and the sink in the other.
of a cut C is the set of edges that connect the source part of the cut to the sink part: Thus, if all the edges in the cut-set of C are removed, then no positive flow is possible, because there is no path in the resulting graph from the source to the sink.
In the above situation, one can prove that the value of any flow through a network is less than or equal to the capacity of any s-t cut, and that furthermore a flow with maximal value and a cut with minimal capacity exist.
The main theorem links the maximum flow value with the minimum cut capacity of the network.
Note that the flow through each of the two arrows that connect S to T is at full capacity; this is always the case: a minimal cut represents a 'bottleneck' of the system.
[max total flow from source] minimize
The interpretation of the variables in the min-cut LP is: The minimization objective sums the capacity over all the edges that are contained in the cut.
The equality in the max-flow min-cut theorem follows from the strong duality theorem in linear programming, which states that if the primal program has an optimal solution, x*, then the dual program also has an optimal solution, y*, such that the optimal values formed by the two solutions are equal.
The maximum flow problem can be formulated as the maximization of the electrical current through a network composed of nonlinear resistive elements.
, is equal to the weight of the minimum-weight cut set.
In this new definition, the generalized max-flow min-cut theorem states that the maximum value of an s-t flow is equal to the minimum capacity of an s-t cut in the new sense.
In the undirected edge-disjoint paths problem, we are given an undirected graph G = (V, E) and two vertices s and t, and we have to find the maximum number of edge-disjoint s-t paths in G. Menger's theorem states that the maximum number of edge-disjoint s-t paths in an undirected graph is equal to the minimum number of edges in an s-t cut-set.
We want to select a subset of the project, and purchase a subset of the machines, to maximize the total profit (revenue of the selected projects minus cost of the purchased machines).
The problem is to assign pixels to foreground or background such that the sum of their values minus the penalties is maximum.
Let P be the set of pixels assigned to foreground and Q be the set of points assigned to background, then the problem can be formulated as, This maximization problem can be formulated as a minimization problem instead, that is, The above minimization problem can be formulated as a minimum-cut problem by constructing a network where the source (orange node) is connected to all the pixels with capacity fi, and the sink (purple node) is connected by all the pixels with capacity bi.
Two edges (i, j) and (j, i) with pij capacity are added between two adjacent pixels.
An account of the discovery of the theorem was given by Ford and Fulkerson in 1962:[5] "Determining a maximal steady state flow from one point to another in a network subject to capacity limitations on arcs ... was posed to the authors in the spring of 1955 by T.E.
Harris, who, in conjunction with General F. S. Ross (Ret.)
"[7][8][9] Let G = (V, E) be a network (directed graph) with s and t being the source and the sink of G respectively.
In the residual graph (Gf ) obtained for G (after the final flow assignment by Ford–Fulkerson algorithm), define two subsets of vertices as follows: Claim.
value( f ) = c(A, Ac), where the capacity of an s-t cut is defined by Now, we know,
Therefore, for value( f ) = c(A, Ac) we need: To prove the above claim we consider two cases: Both of the above statements prove that the capacity of cut obtained in the above described manner is equal to the flow obtained in the network.
Also, the flow was obtained by Ford-Fulkerson algorithm, so it is the max-flow of the network as well.
A corollary from this proof is that the maximum flow through any set of edges in a cut of a graph is equal to the minimum capacity of all previous cuts.