# Max-flow min-cut theorem

Max-flow min-cut theorem (Redirected from Max flow min cut theorem) Jump to navigation Jump to search 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, d.h., 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 programs and can be used to derive Menger's theorem and the Kőnig–Egerváry theorem.[1] Inhalt 1 Definitionen und Erklärung 1.1 Network 1.2 Flows 1.3 Cuts 1.4 Hauptsatz 2 Beispiel 3 Linear program formulation 4 Anwendung 4.1 Cederbaum's maximum flow theorem 4.2 Generalized max-flow min-cut theorem 4.3 Menger's theorem 4.4 Project selection problem 4.5 Image segmentation problem 5 Geschichte 6 Nachweisen 7 Siehe auch 8 References 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 N = (v, E), where V denotes the finite set of vertices and E ⊆ V×V is the set of directed edges; a source s ∈ V and a sink t ∈ V; a capacity function, which is a mapping {Anzeigestil c:Eto mathbb {R} ^{+}} denoted by cuv or c(u, v) zum (u,v) ∈ E. It represents the maximum amount of flow that can pass through an edge. Flows A flow through a network is a mapping {Anzeigestil f:Eto mathbb {R} ^{+}} bezeichnet durch {Anzeigestil f_{uv}} oder {Anzeigestil f(u,v)} , subject to the following two constraints: Capacity Constraint: For every edge {Anzeigestil (u,v)in e} , {Anzeigestil f_{uv}leq c_{uv}.} Conservation of Flows: For each vertex {Anzeigestil v} apart from {Anzeigestil s} und {Anzeigestil t} (d.h. the source and sink, beziehungsweise), the following equality holds: {displaystyle sum nolimits _{{u:(u,v)in e}}f_{uv}=sum nolimits _{{w:(v,w)in e}}f_{vw}.} 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 {Anzeigestil |f|=sum nolimits _{{v:(s,v)in e}}f_{sv}=sum nolimits _{{v:(v,t)in e}}f_{vt},} where as above {Anzeigestil s} is the source and {Anzeigestil t} 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 {Anzeigestil |f|} , das ist, to route as much flow as possible from {Anzeigestil s} zu {Anzeigestil t} .

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 C = (S, T) is a partition of V such that s ∈ S and t ∈ T. Das ist, 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 {Anzeigestil X_{C}} of a cut C is the set of edges that connect the source part of the cut to the sink part: {Anzeigestil X_{C}:={(u,v)in e : uin S,vin T}=(Stimes T)cap E.} Daher, 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.

The capacity of an s-t cut is the sum of the capacities of the edges in its cut-set, {Anzeigestil c(S,T)=sum nolimits _{(u,v)in X_{C}}c_{uv}=sum nolimits _{(ich,j)in e}c_{ij}d_{ij},} wo {Anzeigestil d_{ij}=1} wenn {displaystyle iin S} und {displaystyle jin T} , {Anzeigestil 0} Andernfalls.

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 c(S, T), das ist, determine S and T 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 A maximal flow in a network. Each edge is labeled with f/c, where f is the flow over the edge and c is the edge's capacity. The flow value is 5. There are several minimal s-t cuts with capacity 5; one is S={s,p} and T={Ö, q, r, t}.

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={s,p} and T={Ö, q, r, t}. The capacities of the edges that cross this cut are 3 und 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.[2] Max-flow (Primal) Min-cut (Dual) Variablen {Anzeigestil f_{uv}} {displaystyle forall (u,v)in e} [a variable per edge] {Anzeigestil d_{uv}} {displaystyle forall (u,v)in e} [a variable per edge] {Anzeigestil z_{v}} {displaystyle forall vin Vsetminus {s,t}} [a variable per non-terminal node] objective maximize {displaystyle sum nolimits _{v:(s,v)in e}f_{sv}} [max total flow from source] minimize {displaystyle sum nolimits _{(u,v)in e}c_{uv}d_{uv}} [min total capacity of edges in cut] constraints subject to {Anzeigestil {Start{ausgerichtet}f_{uv}&leq c_{uv}&&forall (u,v)in E\sum _{u}f_{uv}-Summe _{w}f_{vw}&=0&&vin Vsetminus {s,t}Ende{ausgerichtet}}} [a constraint per edge and a constraint per non-terminal node] unterliegen {Anzeigestil {Start{ausgerichtet}d_{uv}-z_{u}+z_{v}&geq 0&&forall (u,v)in e,uneq s,vneq t\d_{sv}+z_{v}&geq 1&&forall (s,v)in e,vneq t\d_{ut}-z_{u}&geq 0&&forall (u,t)in e,uneq s\d_{st}&geq 1&&{Text{wenn }}(s,t)in Eend{ausgerichtet}}} [a constraint per edge] sign constraints {Anzeigestil {Start{ausgerichtet}f_{uv}&geq 0&&forall (u,v)in E\end{ausgerichtet}}} {Anzeigestil {Start{ausgerichtet}d_{uv}&geq 0&&forall (u,v)in E\z_{v}&in mathbb {R} &&forall vin Vsetminus {s,t}Ende{ausgerichtet}}} The max-flow LP is straightforward. The dual LP is obtained using the algorithm described in dual linear program: 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: {Anzeigestil d_{uv}={Start{Fälle}1,&{Text{wenn }}uin S{Text{ und }}vin T{Text{ (the edge }}uv{Text{ is in the cut) }}\0,&{Text{Andernfalls}}Ende{Fälle}}} {Anzeigestil z_{v}={Start{Fälle}1,&{Text{wenn }}vin S\0,&{Text{Andernfalls}}Ende{Fälle}}} 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:[3] The constraints {Anzeigestil d_{uv}-z_{u}+z_{v}geq 0} (equivalent to {Anzeigestil d_{uv}geq z_{u}-z_{v}} ) 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 ( {Anzeigestil d_{uv}geq 1} ). The constraints {Anzeigestil d_{sv}+z_{v}geq 1} (equivalent to {Anzeigestil d_{sv}geq 1-z_{v}} ) 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 {Anzeigestil d_{ut}-z_{u}geq 0} (equivalent to {Anzeigestil d_{ut}geq z_{u}} ) guarantee that, if u is in S, then the edge (u,t) is counted in the cut (since t is by definition in T).

Beachten Sie, dass, 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 See also: 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.[4] In dieser Formulierung, the limit of the current  Iin between the input terminals of the electrical network as the input voltage Vin approaches {displaystyle infty } , is equal to the weight of the minimum-weight cut set.

{Anzeigestil lim _{V_{Text{in}}to infty }(ICH_{in})=min _{X_{C}}Summe _{(u,v)in X_{C}}c_{uv}} Generalized max-flow min-cut theorem In addition to edge capacity, consider there is capacity at each vertex, das ist, a mapping {Anzeigestil c:Vto mathbb {R} ^{+}} denoted by c(v), such that the flow  f  has to satisfy not only the capacity constraint and the conservation of flows, but also the vertex capacity constraint {displaystyle forall vin Vsetminus {s,t}:qquad sum nolimits _{{uin Vmid (u,v)in e}}f_{uv}leq c(v).} Mit anderen Worten, 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 diesem Fall, 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 See also: Menger's Theorem 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.

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 See also: Maximum flow problem A network formulation of the project selection problem with the optimal solution In the project selection problem, there are n projects and m machines. Each project pi yields revenue r(Pi) and each machine qj costs c(qj) 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 P be the set of projects not selected and Q be the set of machines purchased, then the problem can be formulated as, {displaystyle max{g}= Summe _{ich}r(p_{ich})-Summe _{p_{ich}in P}r(p_{ich})-Summe _{q_{j}in Q}c(q_{j}).} Since the first term does not depend on the choice of P and Q, this maximization problem can be formulated as a minimization problem instead, das ist, {displaystyle min{g'}= Summe _{p_{ich}in P}r(p_{ich})+Summe _{q_{j}in Q}c(q_{j}).} 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 r(Pi), and the sink is connected by the machines with capacity c(qj). An edge (Pi, qj) with infinite capacity is added if project pi requires machine qj. The s-t cut-set represents the projects and machines in P and Q respectively. By the max-flow min-cut theorem, one can solve the problem as a maximum flow problem.

The figure on the right gives a network formulation of the following project selection problem: Project r(Pi) Machine c(qj) 1 100 200 Project 1 requires machines 1 und 2.

2 200 100 Project 2 requires machine 2.

3 150 50 Project 3 requires machine 3.

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 p2 and p3.

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 See also: Maximum flow problem Each black node denotes a pixel.

In the image segmentation problem, there are n pixels. Each pixel i can be assigned a foreground value  fi or a background value bi. There is a penalty of pij if pixels i, j 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 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, {displaystyle max{g}= Summe _{iin P}f_{ich}+Summe _{iin Q}b_{ich}-Summe _{iin P,jin Qlor jin P,iin Q}p_{ij}.} This maximization problem can be formulated as a minimization problem instead, das ist, {displaystyle min{g'}= Summe _{iin P,jin Qlor jin P,iin Q}p_{ij}.} 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 (ich, j) und (j, ich) with pij capacity are added between two adjacent pixels. The s-t cut-set then represents the pixels assigned to the foreground in P and pixels assigned to background in Q.

History 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, wer, in conjunction with General F. S. Roß (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, Satz 5.1, which we call the max-flow min-cut theorem, was conjectured and established.[6] A number of proofs have since appeared."[7][8][9] Proof Let G = (v, E) be a network (directed graph) with s and t being the source and the sink of G respectively.

Consider the flow  f  computed for G by Ford–Fulkerson algorithm. In the residual graph (Gf ) obtained for G (after the final flow assignment by Ford–Fulkerson algorithm), define two subsets of vertices as follows: EIN: the set of vertices reachable from s in Gf Ac: the set of remaining vertices i.e. V − A Claim. value(f) = c(EIN, Ac), where the capacity of an s-t cut is defined by {Anzeigestil c(S,T)=sum nolimits _{(u,v)in Stimes T}c_{uv}} .

Jetzt, we know, {displaystyle value(f)=f_{out}(EIN)-f_{in}(EIN)} for any subset of vertices, EIN. Deswegen, for value(f) = c(EIN, Ac) 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 G, there exists an outgoing edge {Anzeigestil (x,j),xin A,yin A^{c}} such that it is not saturated, d.h., f(x, j) < cxy. This implies, that there exists a forward edge from x to y in Gf, therefore there exists a path from s to y in Gf, which is a contradiction. Hence, any outgoing edge (x, y) is fully saturated. In G, there exists an incoming edge {displaystyle (y,x),xin A,yin A^{c}} such that it carries some non-zero flow, i.e.,  f (y, x) > 0. This implies, that there exists a backward edge from x to y in Gf, therefore there exists a path from s to y in Gf, which is again a contradiction. Somit, any incoming edge (j, x) 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. Ebenfalls, the flow was obtained by Ford-Fulkerson algorithm, so it is the max-flow of the network as well.

Ebenfalls, 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 which obtains the max-flow.

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 Linear programming Maximum flow Minimum cut Flow network Edmonds–Karp algorithm Ford–Fulkerson algorithm Approximate max-flow min-cut theorem Menger's theorem References ^ Dantzig, G.B.; Fulkerson, D.R. (9 September 1964). "On the max-flow min-cut theorem of networks" (Pdf). RAND Corporation: 13. Vom Original archiviert (Pdf) an 5 Kann 2018. ^ Trevisan, Luca. "Lecture 15 from CS261: Optimization" (Pdf). ^ Keller, Orgad. "LP min-cut max-flow presentation". ^ Cederbaum, ich. (August 1962). "On the optimal operation of communication nets". Journal of the Franklin Institute. 274: 130–141. ^ L. R. Ford Jr. & D. R. Fulkerson (1962) Flows in Networks, Seite 1, Princeton University Press MR0159700 ^ L. R. Ford Jr. und d. R. Fulkerson (1956) "Maximal flow through a network", Kanadisches Journal für Mathematik 8: 399-404 ^ P. Elias, EIN. Feinstein, und C. E. Shannon (1956) "A note on the maximum flow through a network", IRE. Transactions on Information Theory, 2(4): 117–119 ^ George Dantzig and D. R. Fulkerson (1956) "On the Max-Flow MinCut Theorem of Networks", in Linear Inequalities, Ann. Mathematik. Studies, nein. 38, Princeton, New Jersey ^ L. R. Ford & D. R. Fulkerson (1957) "A simple algorithm for finding the maximum network flows and an application to the Hitchcock problem", Kanadisches Journal für Mathematik 9: 210–18 Eugene Lawler (2001). "4.5. Combinatorial Implications of Max-Flow Min-Cut Theorem, 4.6. Linear Programming Interpretation of Max-Flow Min-Cut Theorem". Combinatorial Optimization: Networks and Matroids. Dover. pp. 117–120. ISBN 0-486-41453-1. Christos H. Papadimitriou, Kenneth Steiglitz (1998). "6.1 The Max-Flow, Min-Cut Theorem". Combinatorial Optimization: Algorithms and Complexity. Dover. pp. 120–128. ISBN 0-486-40258-4. Vijay V. Vazirani (2004). "12. Introduction to LP-Duality". Approximation Algorithms. Springer. pp. 93–100. ISBN 3-540-65367-8. Kategorien: Combinatorial optimizationTheorems in graph theoryNetwork flow problem

Wenn Sie andere ähnliche Artikel wissen möchten Max-flow min-cut theorem Sie können die Kategorie besuchen Combinatorial optimization.

Geh hinauf

Wir verwenden eigene Cookies und Cookies von Drittanbietern, um die Benutzererfahrung zu verbessern Mehr Informationen