Definitions

# Max-flow min-cut theorem

The max-flow min-cut theorem is a statement in optimization theory about maximum flows in flow networks. It derives from Menger's theorem. It states that:
The maximum amount of flow is equal to the capacity of a minimal cut.

In other words, the theorem states that the maximum flow in a network is dictated by its bottleneck. Between any two nodes, the quantity of material flowing from one to the other cannot be greater than the weakest set of links somewhere between the two nodes.

## Definition

Suppose $G\left(V,E\right)$ is a finite directed graph and every edge $\left(u,v\right)$ has a capacity $c\left(u,v\right)$ (a non-negative real number). Further assume two vertices, the source $s$ and the sink $t$, have been distinguished.

A cut is a split of the nodes into two disjoint sets $S$ and $T$, such that $s$ is in $S$ and $t$ is in $T$. Hence there are

$2^$

possible cuts in a graph. The capacity of a cut $\left(S,T\right)$ is

$c\left(S,T\right) = sum_\left\{u in S, v in T | \left(u,v\right) in E\right\} c\left(u,v\right)$,

the sum of the capacity of all the edges crossing the cut, from the region $S$ to the region $T$.

The following three conditions are equivalent:

1. $f$ is a maximum flow in $G$
2. The residual network $G_f$ contains no augmenting paths.
3. $|f| = c\left(S,T\right)$ for some cut $\left(S,T\right)$.

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 $S$, the nodes reachable from $s$ in the residual network, and $T$, those not reachable. Then $c\left(S,T\right)$ in the residual network must be 0. If it is not, there is an edge $\left(u,v\right)$ with $c\left(u,v\right) > 0$. But then $v$ is reachable from $s$, and cannot be in $T$.

In particular this proves that max flow $ge$ min cut, since max flow $ge |f| = c\left(S,T\right) ge$ min cut.

We also have max flow $le$ min cut because given any flow, $f$, and any cut, $\left(S,T\right)$, we can sum the equations of conservation of flow at every point of $S setminus \left\{s\right\}$ to show that |f| = the flow of f along edges joining S and T which is no more than $c\left(S,T\right)$.

## Linear Program

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 $overrightarrow\left\{uv\right\}in E$ is represented by $c\left(overrightarrow\left\{uv\right\}\right)$. 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)

Maximize

$qquadmathbf\left\{f\left(overrightarrow\left\{TS\right\}\right)\right\}$

Subject To

$sum_\left\{overrightarrow\left\{vu\right\}in E\right\} f\left(overrightarrow\left\{vu\right\}\right) - sum_\left\{overrightarrow\left\{uv\right\}in E\right\} f\left(overrightarrow\left\{uv\right\}\right) = 0 qquad forall u in Vneq \left\{S, T\right\} qquad leftrightarrow p\left(u\right)$

$sum_\left\{overrightarrow\left\{vT\right\}in E\right\} f\left(overrightarrow\left\{vT\right\}\right) - sum_\left\{overrightarrow\left\{Tv\right\}in E\right\} f\left(overrightarrow\left\{Tv\right\}\right) - f\left(overrightarrow\left\{TS\right\}\right) = 0 qquad leftrightarrow p\left(T\right)$

$sum_\left\{overrightarrow\left\{vS\right\}in E\right\} f\left(overrightarrow\left\{vS\right\}\right) + f\left(overrightarrow\left\{TS\right\}\right) - sum_\left\{overrightarrow\left\{Sv\right\}in E\right\} f\left(overrightarrow\left\{Sv\right\}\right) = 0 qquad leftrightarrow p\left(S\right)$

$f\left(overrightarrow\left\{uv\right\}\right) leq c\left(overrightarrow\left\{uv\right\}\right) qquad forall overrightarrow\left\{uv\right\}in E qquad leftrightarrow x\left(overrightarrow\left\{uv\right\}\right)$

Bounds

$f\left(overrightarrow\left\{uv\right\}\right) geq 0 qquad forall overrightarrow\left\{uv\right\} in E, quad f\left(overrightarrow\left\{TS\right\}\right) geq 0$

Primal Explanation: The linear program computes the max flow in the variable $f\left(overrightarrow\left\{TS\right\}\right)$. $overrightarrow\left\{TS\right\}$ 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)

Minimize
$mathbf\left\{sum_\left\{overrightarrow\left\{uv\right\} in E\right\} c\left(overrightarrow\left\{uv\right\}\right) . x\left(overrightarrow\left\{uv\right\}\right)\right\}$

Subject To

$p\left(v\right) - p\left(u\right) + x\left(overrightarrow\left\{uv\right\}\right) geq 0 qquad forall overrightarrow\left\{uv\right\} in E qquad leftrightarrow f\left(overrightarrow\left\{uv\right\}\right)$

$p\left(S\right) - p\left(T\right) geq 1 qquad leftrightarrow f\left(overrightarrow\left\{TS\right\}\right)$

Bounds

$p\left(u\right) free quad forall u, x\left(overrightarrow\left\{uv\right\}\right) geq 0 quad forall overrightarrow\left\{uv\right\}$

Dual explanation: The dual can be written mechanically from the primal based on the duality theorem in linear programming. In the dual, the variable $x\left(overrightarrow\left\{uv\right\}\right)$ decides whether an edge is a cut edge are not. The edges for which $x\left(overrightarrow\left\{uv\right\}\right)>0$ 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.

## Example

Given to the right is a network with nodes $V=\left\{s,o,p,q,r,t\right\}$, and a total flow from the source $s$ to the sink $t$ 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:

 Cut Capacity $S=\left\{s,p\right\},T=\left\{o,q,r,t\right\}$ $c\left(s,o\right)+c\left(p,r\right)=3+2=5$ $S=\left\{s,o,p\right\},T=\left\{q,r,t\right\}$ $c\left(o,q\right)+c\left(p,r\right)=3+2=5$ $S=\left\{s,o,p,q,r\right\},T=\left\{t\right\}$ $c\left(q,t\right)+c\left(r,t\right)=2+3=5$

Notice that $S=\left\{s,o,p,r\right\},T=\left\{q,t\right\}$ is not a minimal cut, even though both $\left(o,q\right)$ and $\left(r,t\right)$ are saturated in the given flow. This is because in the residual network $G_f$, there is an edge (r,q) with capacity $c_f\left(r,q\right) = c\left(r,q\right)-f\left(r,q\right)=0-\left(-1\right)=1$.

## History

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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 67, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.871164083480835, "perplexity": 188.6359842302833}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-35/segments/1408500822560.65/warc/CC-MAIN-20140820021342-00453-ip-10-180-136-8.ec2.internal.warc.gz"}