In
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
and
optimization theory
Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criterion, from some set of available alternatives. It is generally divided into two subfi ...
, the max-flow min-cut theorem states that in a
flow network
In graph theory, a flow network (also known as a transportation network) is a directed graph where each edge has a capacity and each edge receives a flow. The amount of flow on an edge cannot exceed the capacity of the edge. Often in operations res ...
, 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
In graph theory, a minimum cut or min-cut of a graph is a cut (a partition of the vertices of a graph into two disjoint subsets) that is minimal in some metric.
Variations of the minimum cut problem consider weighted graphs, directed graphs, term ...
, i.e., the smallest total weight of the edges which if removed would disconnect the source from the sink.
This is a special case of the
duality theorem for
linear program
Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear relationships. Linear programming is ...
s and can be used to derive
Menger's theorem
In the mathematical discipline of graph theory, Menger's theorem says that in a finite graph, the size of a minimum cut set is equal to the maximum number of disjoint paths that can be found between any pair of vertices.
Proved by Karl Menger in ...
and the
Kőnig–Egerváry theorem.
Definitions and statement
The theorem equates two quantities: the maximum flow through a network, and the minimum capacity of a cut of the network. To state the theorem, each of these notions must first be defined.
Network
A network consists of
* a finite
directed graph
In mathematics, and more specifically in graph theory, a directed graph (or digraph) is a graph that is made up of a set of vertices connected by directed edges, often called arcs.
Definition
In formal terms, a directed graph is an ordered pa ...
, where ''V'' denotes the finite set of vertices and is the set of directed edges;
* a source and a sink ;
* a capacity function, which is a mapping
denoted by or for . It represents the maximum amount of flow that can pass through an edge.
Flows
A flow through a network is a mapping
denoted by
or
, subject to the following two constraints:
# Capacity Constraint: For every edge
,
# Conservation of Flows: For each vertex
apart from
and
(i.e. the source and sink, respectively), the following equality holds:
A flow can be visualized as a physical flow of a fluid through the network, following the direction of each edge. 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 value of a flow is defined by
:
where as above
is the source and
is the sink of the network. In the fluid analogy, it represents the amount of fluid entering the network at the source. Because of the conservation axiom for flows, this is the same as the amount of flow leaving the network at the sink.
The maximum flow problem asks for the largest flow on a given network.
Maximum Flow Problem. Maximize , that is, to route as much flow as possible from to .
Cuts
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 is a partition of such that and . 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. The cut-set
of a cut 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 are removed, then no positive flow is possible, because there is no path in the resulting graph from the source to the sink.
The capacity of an ''s-t cut'' is the sum of the capacities of the edges in its cut-set,
:
where
if
and
,
otherwise.
There are typically many cuts in a graph, but cuts with smaller weights are often more difficult to find.
:Minimum s-t Cut Problem. Minimize , that is, determine and such that the capacity of the s-t cut is minimal.
Main theorem
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.
: Max-flow min-cut theorem. The maximum value of an s-t flow is equal to the minimum capacity over all s-t cuts.
Example
The figure on the right shows a flow in a network. The numerical annotation on each arrow, in the form ''f''/''c'', indicates the flow (''f'') and the capacity (''c'') of the arrow. The flows emanating from the source total five (2+3=5), as do the flows into the sink (2+3=5), establishing that the flow's value is 5.
One ''s''-''t'' cut with value 5 is given by ''S''= and ''T''=. The capacities of the edges that cross this cut are 3 and 2, giving a cut capacity of 3+2=5. (The arrow from ''o'' to ''p'' is not considered, as it points from ''T'' back to ''S''.)
The value of the flow is equal to the capacity of the cut, showing that the flow is a maximal flow and the cut is a minimal cut.
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.
Linear program formulation
The max-flow problem and min-cut problem can be formulated as two
primal-dual linear programs
Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear relationships. Linear programming is ...
.
The max-flow LP is straightforward. The dual LP is obtained using the algorithm described in
dual linear program The dual of a given linear program (LP) is another LP that is derived from the original (the primal) LP in the following schematic way:
* Each variable in the primal LP becomes a constraint in the dual LP;
* Each constraint in the primal LP becomes ...
: the variables and sign constraints of the dual correspond to the constraints of the primal, and the constraints of the dual correspond to the variables and sign constraints of the primal. The resulting LP requires some explanation. 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 constraints guarantee that the variables indeed represent a legal cut:
* The constraints
(equivalent to
) guarantee that, for non-terminal nodes ''u,v'', if ''u'' is in ''S'' and ''v'' is in ''T'', then the edge (''u'',''v'') is counted in the cut (
).
* The constraints
(equivalent to
) guarantee that, if ''v'' is in ''T'', then the edge ''(s,v)'' is counted in the cut (since ''s'' is by definition in ''S'').
* The constraints
(equivalent to
) guarantee that, if ''u'' is in ''S'', then the edge ''(u,t)'' is counted in the cut (since ''t'' is by definition in ''T'').
Note that, since this is a minimization problem, we do not have to guarantee that an edge is ''not'' in the cut - we only have to guarantee that each edge that should be in the cut, is summed in the objective function.
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.
Application
Cederbaum's maximum flow theorem
The maximum flow problem can be formulated as the maximization of the electrical current through a network composed of nonlinear resistive elements. In this formulation, the limit of the current between the input terminals of the electrical network as the input voltage approaches
, is equal to the weight of the minimum-weight cut set.
:
Generalized max-flow min-cut theorem
In addition to edge capacity, consider there is capacity at each vertex, that is, a mapping
denoted by , such that the flow has to satisfy not only the capacity constraint and the conservation of flows, but also the vertex capacity constraint
:
In other words, the amount of ''flow'' passing through a vertex cannot exceed its capacity. Define an ''s-t cut'' to be the set of vertices and edges such that for any path from ''s'' to ''t'', the path contains a member of the cut. In this case, the ''capacity of the cut'' is the sum the capacity of each edge and vertex in it.
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.
Menger's theorem
In the undirected edge-disjoint paths problem, we are given an undirected graph and two vertices and , and we have to find the maximum number of edge-disjoint s-t paths in .
The 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.
Project selection problem
In the project selection problem, there are projects and machines. Each project yields revenue and each machine costs to purchase. Each project requires a number of machines and each machine can be shared by several projects. The problem is to determine which projects and machines should be selected and purchased respectively, so that the profit is maximized.
Let be the set of projects ''not'' selected and be the set of machines purchased, then the problem can be formulated as,
:
Since the first term does not depend on the choice of and , this maximization problem can be formulated as a minimization problem instead, that is,
:
The above minimization problem can then be formulated as a minimum-cut problem by constructing a network, where the source is connected to the projects with capacity , and the sink is connected by the machines with capacity . An edge with ''infinite'' capacity is added if project requires machine . The s-t cut-set represents the projects and machines in and respectively. By the max-flow min-cut theorem, one can solve the problem as a
maximum flow problem
In optimization theory, maximum flow problems involve finding a feasible flow through a flow network that obtains the maximum possible flow rate.
The maximum flow problem can be seen as a special case of more complex network flow problems, such ...
.
The figure on the right gives a network formulation of the following project selection problem:
The minimum capacity of an s-t cut is 250 and the sum of the revenue of each project is 450; therefore the maximum profit ''g'' is 450 − 250 = 200, by selecting projects and .
The idea here is to 'flow' each project's profits through the 'pipes' of its machines. If we cannot fill the pipe from a machine, the machine's return is less than its cost, and the min cut algorithm will find it cheaper to cut the project's profit edge instead of the machine's cost edge.
Image segmentation problem
In the image segmentation problem, there are pixels. Each pixel can be assigned a foreground value or a background value . There is a penalty of if pixels are adjacent and have different assignments. The problem is to assign pixels to foreground or background such that the sum of their values minus the penalties is maximum.
Let be the set of pixels assigned to foreground and 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 , and the sink (purple node) is connected by all the pixels with capacity . Two edges () and () with capacity are added between two adjacent pixels. The s-t cut-set then represents the pixels assigned to the foreground in and pixels assigned to background in .
History
An account of the discovery of the theorem was given by
Ford
Ford commonly refers to:
* Ford Motor Company, an automobile manufacturer founded by Henry Ford
* Ford (crossing), a shallow crossing on a river
Ford may also refer to:
Ford Motor Company
* Henry Ford, founder of the Ford Motor Company
* Ford F ...
and
Fulkerson in 1962:
"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.) had formulated a simplified model of railway traffic flow, and pinpointed this particular problem as the central one suggested by the model. It was not long after this until the main result, Theorem 5.1, which we call the max-flow min-cut theorem, was conjectured and established. A number of proofs have since appeared."
[L. R. Ford & D. R. Fulkerson (1957) "A simple algorithm for finding the maximum network flows and an application to the Hitchcock problem", ''Canadian Journal of Mathematics'' 9: 210–18]
Proof
Let be a network (directed graph) with and being the source and the sink of respectively.
Consider the flow computed for by
Ford–Fulkerson algorithm. In the residual graph obtained for (after the final flow assignment by
Ford–Fulkerson algorithm), define two subsets of vertices as follows:
# : the set of vertices reachable from in
# : the set of remaining vertices i.e.
Claim. , where the capacity of an ''s-t cut'' is defined by
:
.
Now, we know,
for any subset of vertices, . Therefore, for we need:
* All ''outgoing edges'' from the cut must be fully saturated.
* All ''incoming edges'' to the cut must have zero flow.
To prove the above claim we consider two cases:
*In , there exists an ''outgoing edge''
such that it is not saturated, i.e., . This implies, that there exists a forward edge from to in , therefore there exists a path from to in , which is a contradiction. Hence, any outgoing edge is fully saturated.
*In , there exists an ''incoming edge''
such that it carries some non-zero flow, i.e., . This implies, that there exists a backward edge from to in , therefore there exists a path from to in , which is again a contradiction. Hence, any incoming edge must have zero flow.
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
In optimization theory, maximum flow problems involve finding a feasible flow through a flow network that obtains the maximum possible flow rate.
The maximum flow problem can be seen as a special case of more complex network flow problems, such ...
of the network as well.
Also, since any flow in the network is always less than or equal to capacity of every cut possible in a network, the above described cut is also the
min-cut
In graph theory, a minimum cut or min-cut of a graph is a cut (a partition of the vertices of a graph into two disjoint subsets) that is minimal in some metric.
Variations of the minimum cut problem consider weighted graphs, directed graphs, term ...
which obtains the
max-flow
In optimization theory, maximum flow problems involve finding a feasible flow through a flow network that obtains the maximum possible flow rate.
The maximum flow problem can be seen as a special case of more complex network flow problems, such ...
.
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.
See also
*
GNRS conjecture
In theoretical computer science and metric geometry, the GNRS conjecture connects the theory of graph minors, the stretch factor of embeddings, and the approximation ratio of multi-commodity flow problems. It is named after Anupam Gupta, Ilan Newma ...
*
Linear programming
Linear programming (LP), also called linear optimization, is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear function#As a polynomial function, li ...
*
Maximum flow
In optimization theory, maximum flow problems involve finding a feasible flow through a flow network that obtains the maximum possible flow rate.
The maximum flow problem can be seen as a special case of more complex network flow problems, such ...
*
Minimum cut
In graph theory, a minimum cut or min-cut of a graph is a cut (a partition of the vertices of a graph into two disjoint subsets) that is minimal in some metric.
Variations of the minimum cut problem consider weighted graphs, directed graphs, term ...
*
Flow network
In graph theory, a flow network (also known as a transportation network) is a directed graph where each edge has a capacity and each edge receives a flow. The amount of flow on an edge cannot exceed the capacity of the edge. Often in operations res ...
*
Edmonds–Karp algorithm
In computer science, the Edmonds–Karp algorithm is an implementation of the Ford–Fulkerson method for computing the maximum flow in a flow network in O(, V, , E, ^2) time. The algorithm was first published by Yefim Dinitz (whose name is also ...
*
Ford–Fulkerson algorithm
*
Approximate max-flow min-cut theorem
Approximate max-flow min-cut theorems are mathematical propositions in network flow theory. They deal with the relationship between maximum flow rate ("max-flow") and minimum cut ("min-cut") in a multi-commodity flow problem. The theorems have e ...
*
Menger's theorem
In the mathematical discipline of graph theory, Menger's theorem says that in a finite graph, the size of a minimum cut set is equal to the maximum number of disjoint paths that can be found between any pair of vertices.
Proved by Karl Menger in ...
References
*
*
* {{cite book, author=
Vijay V. Vazirani, title=Approximation Algorithms, chapter=12. Introduction to LP-Duality , year = 2004 , publisher = Springer , isbn = 3-540-65367-8 , pages = 93–100
Combinatorial optimization
Theorems in graph theory
Network flow problem