0% found this document useful (0 votes)
29 views

Flow

The document discusses flows and cuts in graph theory. It defines flows, flow under capacity constraints, cuts, and proves the max-flow min-cut theorem, showing that the maximum possible flow value between two vertices in a graph equals the minimum cut capacity. An algorithm is also presented for finding the maximum flow.

Uploaded by

GAURISH TRIVEDI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Flow

The document discusses flows and cuts in graph theory. It defines flows, flow under capacity constraints, cuts, and proves the max-flow min-cut theorem, showing that the maximum possible flow value between two vertices in a graph equals the minimum cut capacity. An algorithm is also presented for finding the maximum flow.

Uploaded by

GAURISH TRIVEDI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Flows and Cuts

Graph Theory (Fall 2011)


Rutgers University
Swastik Kopparty

1 Flows

We now study flows on graphs.

Definition 1 (Directed Graph). A directed graph G is a tuple (V, E) where E ⊆ V 2 . Here V is


the set of vertices and E is the set of directed edges. If (u, v) ∈ E, we say that there is an edge in
the graph G from u to v.
Further, if S, T ⊆ V , we denote by E(S, T ) the set of edges from some vertex in S to some vertex
in T :
E(S, T ) = {(u, v) ∈ E | u ∈ S, v ∈ T }.

Let G = (V, E) be a directed graph, and let s, t ∈ V . A flow in G from s to t is an allocation


of “current” to each edge of G, such that the net current entering any vertex v 6= s, t equals 0.
Formally, it is given by a function f : E → R such that f (e) ≥ 0 for each e ∈ E, and such that for
each v 6= s, t:
NetFlow(v) = 0,
where X X
NetFlow(v) = f (e) − f (e)
e∈E:e=(v,·) e∈E:e=(·,v)

(Notice that the expression for NetFlow(v) equals the total flow on edges out of v minus the total
flow on edges into v).
We have the following simple lemma.

Lemma 2. Let S ⊆ V . Let S denote V \ S. Then


X X X
NetFlow(v) = f (e) − f (e).
v∈S e∈E(S,S) e∈E(S,S)

Proof. Immediate from the definitions.

Applying this to S = V , we get that NetFlow(s)+NetFlow(t) = 0, and so NetFlow(s) = −NetFlow(t).


We call this quantity the value of the flow f from s to t.

Value(f ) = NetFlow(s).

1
2 Flows under capacity constraints

Let G = (V, E) be a directed graph. Let c : E → R be a function with c(e) ≥ 0 for each e ∈ E. We
will call c(e) the capacity of the edge E.
Let s, t ∈ V . A flow from s to t satisfying the capacities c is a flow f : E → R such that f (e) ≤ c(e)
for each edge e ∈ E.

3 Cuts

A cut in a graph G is simply a partition of the vertex set into two nonempty sets. If s, t are two
vertices of G, an (s, t)-cut is a partition of the vertex set into two nonempty sets such that s is in
one set and t is in the other.
Every cut in the graph G gives a simple upper bound on the maximum possible value of a flow
satisfying given capacity constraints.
Lemma 3. For every flow f satisfying the capacities c, and for every S ⊆ V , such that s ∈ S and
t ∈ S,
Value(f ) ≤ Capacity(S, S).

Proof. Using Lemma 2, we have:


X
NetFlow(s) = NetFlow(v)
v∈S
X X
= f (e) − f (e)
e∈E(S,S) e∈E(S,S)
X
≤ c(e) − 0
e∈E(S,S)

= Capacity(S, S).
Here we used the fact that 0 ≤ f (e) ≤ c(e) to derive the “≤” step.

4 Max-Flow / Min-Cut

In particular, the previous lemma implies that:


max Value(f ) ≤ min Capacity(S, S),
f S

where f varies over flows satisfying c, and S varies over (s, t)-cuts.
The max-flow-min-cut theorem says that these quantities are in fact equal.
Theorem 4 (Max-Flow/Min-Cut). Let G be a directed graph, and let c be a capacity function on
the edges of G. Then:
max Value(f ) = min Capacity(S, S),
f S

where f varies over flows satisfying c, and S varies over (s, t)-cuts.

2
The proof of this theorem will also lead to a simple, quick algorithm to find the maximum flow, as
well as a cut with capacity = value (thus showing that the flow is indeed max).

Proof. Let f be a flow satisfying c that maximizes Value(f ). We will show how to use f to find
a cut (S, S) whose capacity is Value(f ). Note that we crucially need to use the fact that f is a
maximum flow, this argument cannot work with any old flow.
The cut we are looking for is a “bottleneck” for f , across which no extra flow can be sent. Thus it
makes sense to look for the set S of vertices that can “receive” more flow. This is what we achieve
in the following procedure:

• Initialize S = {s}.

• Repeatedly do the following until S grows no further:

– If there exists u ∈ S and v ∈ V \ S are such that (u, v) ∈ E and either f(u,v) < c(u,v) or
f(v,u) > 0, then include v in S.

• Output the cut (S, S).

We first claim that (S, S) is an (s, t)-cut. If not, then t ∈ S. Consider the vertices v0 =
s, v1 , . . . , vk = t which led to t being included in S (i.e., for each i, either f(vi ,vi+1 ) < c(vi ,vi+1 )
or f(vi+1 ,vi ) > 0). Then we can modify f to get a flow with even higher value as follows: for a
suitably small , either increase f(vi ,vi+1 ) by  or decrease f(vi+1 ,vi ) by  (by choice of the vi , at least
one of these modifications will be possible without violating the capacity or nonnegativity of the
flow). This increases Value(f ) by , contradicting the maximality of f . Thus (S, S) is an (s, t)-cut.
Now we verify that Capacity(S, S) equals Value(f ).
We have:
X
Capacity(S, S) = c(e)
e∈E(S,S)
X
= f (e) by definition of S
e∈E(S,S)
X X
= f (e) − f (e) by definition of S again, f (e) = 0 for each e ∈ E(S, S)
e∈E(S,S) e∈E(S,S)

= Value(f ).

This completes the proof.

This leads to the following efficient algorithm to find a maximum flow.

• Start with f = 0.

• Keep doing the following until the max flow is found:

– Construct the set S following the algorithm in the proof of Theorem 4.

3
– If (S, S) is an (s, t)-cut, then we are done; f is the desired max flow, and (S, S) is a cut
which proves that f is maximum.
– Otherwise, as in the proof of Theorem 4, we can modify f and increase Value(f ).

By inspecting the proof of Theorem 4 (and in particular paying attention to the amount by which
Value(f ) can be increased), it is easy to check that ifPall the capacities c(e) are integers, then this
algorithm will find the maximum flow with at most e c(e) modifications of f .
Another important corollary of this algorithm is the integrality of the max flow:

Corollary 5. If c(e) is an integer for each edge e ∈ E, then there is a maximum flow f where f (e)
is an integer for each edge e ∈ E.

You might also like