Skip to main content

Section 7.2 Max Flow - Min Cut

In this section, we consider an algorithm which solves for the maximum flow. We also discuss cuts, and show how duality connects flows and cuts.

Exploration 7.2.1.

Recall Exploration 7.1.1. Suppose that we wish to install a toll booth on these bridges so that each person going to v5 pays a toll at least once. The cost of installing a toll booth on a bridge is proportional to it’s capacity.

(a)

Find three different ways to install these booths, and find what you believe is the cheapest way to do so.

Definition 7.2.2.

Given a capacitated network N, a cut of N is a partition of the vertex set into non-empty subsets C=(V1,V2), where V=V1⊔V2,vs∈V1,vd∈V2.
The capacity of a cut C is the sum ∑vi∈V1,vj∈V2cij.

Activity 7.2.4.

Consider the primal maximization problem for a max flow problem for a capacitated network with unique source vs and unique sink vd:
Maximize: âˆ‘ixidsubject to: âˆ‘ixij−∑ixji=0,for each vertex vjxij≤cij,for each edge(vi,vj)xij≥0,for each edge(vi,vj).

(a)

Consider the dual problem for this maximization problem where μj is the unconstrained dual variable for the vertex equality constraint and the yij is the dual variable for the capacity constraint. Verify that this problem may be written as
Minimize: âˆ‘(vi,vj)∈Ecijyijsubject to: Î¼j+ysj≥0,for each edge (vs,vj)−μi+μj+yij≥0,for each edge(vi,vj),i≠s,j≠d−μi+yid≥1,for each edge (vi,vd)yij≥0,for each edge(vi,vj)
where μs=0,μd=−1.

(b)

Verify that we may simplify the dual solution as:
Minimize: âˆ‘(vi,vj)∈Ecijyijsubject to: âˆ’μi+μj+yij≥0,for each edge(vi,vj)μs=0μd=−1yij≥0,for each edge(vi,vj).

(c)

Suppose μj=−1. What could μi,yij be? What value for μi would minimize the dual objective function? What happens if μi is huge? How would the resulting μi that affect the inequality −μk+μi+yki≥0?
Repeat for μi=0,μj=−1,0.

(d)

Suppose each μk∈{0,−1}, Note that V1:={vi:μi=0},V2:={vj:μj=−1} forms a cut of N.
For vi,vj∈V1, what is the yij that minimizes the objective function?
For vi,vj∈V2, what is the yij that minimizes the objective function?
For vi∈V1,vj∈V2, what is the yij that minimizes the objective function?
For vi∈V2,vj∈V1, what is the yij that minimizes the objective function?
Can any cut of N be modeled this way?

(e)

What is the capacity of the above cut? How does that relate to the dual problem?

(f)

Prove that the maximum flow through a network is bounded above by the minimum cut capacity.

Activity 7.2.5.

We explore a way of generating potential minimum cuts using a maximum flow.
Recall Exploration 7.1.1 and your proposed maximum flow f′.

(a)

Let v0∈V1′, we recursively define V1′ by adding vj to V1′ if either:
  • vi∈V1′,(vi,vj)∈E,xij′<cij.
  • vi∈V1′,(vj,vi)∈E,xji′>0.

(b)

Let V2′:=V∖V1′. What is the cut capacity of (V1′,V2′)?

Activity 7.2.6.

We now prove that the minimum cut capacity is equal to the maximum flow.

(a)

Why does the primal max problem achieve optimality?
Call the maximum flow f′, with flow on each edge xij′.

(b)

Let vs∈V1′, we recursively define V1′ by adding vj to V1′ if either:
  • vi∈V1′,(vi,vj)∈E,xij′<cij.
  • vi∈V1′,(vj,vi)∈E,xji′>0.
and repeating until we stabilize, why must we eventually stabilize?

(c)

Show that for any vk in V1′, there is an α-path P: a sequence of vertices starting vs to vk, where between vi,vj either (vi,vj),(vj,vi)∈E.
We would call the edges (vi,vj) to be forward edges and (vj,vi) backwards edges of P.

(d)

Suppose (by way of contradiction) that vd∈V1′. There is by (c) an α-path P from vs to vd.
q:=min{min(vi,vj) a forward edge{cij−xij′},min(vj,vi) a backwards edge{xji′}}.
Why is q>0?

(e)

We define a new flow f″ as follows: for each forward edge of P, (vi,vj), we add xij″=q+xij′. For each backwards edge (vj,vi) we subtract xji″=xji′−q.
Explain why this is still a valid network flow.

(f)

Explain why f″ has a greater value than f′. Why must vd∉V1′?

(g)

Define V2′=V∖V1′. Prove that for any vi∈V1′,vj∈V2′, we have that xij′=cij,xji″=0.
(Not neccesary for this proof, but to tie things in, if xij″=cij, what does that say about yij from the dual problem in Activity 7.2.4? If xij′<cij, what does that say about yij? )

(i)

Going back to Activity 7.2.4 if we let μi=0 for vi∈V1′ and μj=−1 for vj∈V2′, what is the value of the dual min objective?

Subsection 7.2.1 Algorithms for Max Flow and Min Cut

Exploration 7.2.9.

Consider the following capacitated network with source v0 and sink v5:
Recall the procedure to produce improved flows in Activity 7.2.6.
(b)
Adjust the flow on edges by q appropriately. Explain why we need not consider the edge v2v4 for any future α-paths.
(c)
Pick another α-path where q>0 and repeat until we achieve a maximum flow.
Hint.
A network with multiple sources and sinks.

Definition 7.2.10. Ford-Fulkerson Algorithm.

We describe an algorithm to find the maximum flow for N, a capacitated network with a unique source vs and sink vd:
  1. INITIALIZE: We begin with any feasible flow f (including the zero flow.)
  2. Pick an α-path P in N from vs to vd such that:
    • Each forward edge of P satisfies xij<cij.
    • Eack backwards edge satisfies xij>0.
    (If no such α-path P exists, GOTO 5)
  3. Compute
    q:=min{min(vi,vj) a forward edge{cij−xij′},min(vj,vi) a backwards edge{xji′}}.
  4. Define a new flow f′ as follows: for each forward edge of P, (vi,vj), we add xij′=q+xij. For each backwards edge (vj,vi) we subtract xji′=xji−q.
    Let f:=f′ and GOTO 2
  5. STOP. The flow is now optimal.

Definition 7.2.12. Min Cut Algorithm.

We describe an algorithm to find the minimum for N, a capacitated network with a unique source vs and sink vd:
  1. INITIALIZE: We begin with a maximum flow f′ and V1={vs}.
  2. We add vj to V1 if there is a vi∈V1 such that either:
    • (vi,vj)∈E,xij′<cij.
    • (vj,vi)∈E,xji′>0.
    If there is no such vi, GOTO 4
  3. GOTO 2
  4. Let V2=V∖V1.
    STOP (V1,V2) form a minimum cut.