Flows and Connectivity
Flows and Connectivity
Flows and Connectivity
SOME DEFINITIONS
Any partition of vertex set V in the weighted digraph G=(V,E) into two sets
S and T such that the source s is in S and sink t is in T and the set
(S,T)={(u,v)|u є S and v є T and (u,v) є E)} is called a cut or source-sink-cut in
the network since no flow can be sent from source to sink if all the arcs in
the cut are deleted.
A cut is called a mincut if its capacity does not exceed the capacity of any
other cut.
If f is a feasible flow in the network the sum of flows along the arcs in the
cut (S,T ) is the flow f(S,T) along the cut. Obviously, 0 ≤ f(S,T) ≤ c(S,T)
PROOF
So, ∑i є S∑j f(i,j) - ∑i є S∑j f(j,i) =f(G). If i and j are both in S, the term
f(i,j) appears in first summation ∑i є S∑j f(i,j) as well as in the second
summation ∑i є S∑j f(j,i) .
THEOREM-2:
PROOF
a)f(G) = c(S,T) if and only if f(S,T) – f(T,S) =c(S,T). This is possible if and only
if every arc in cut (T,S) is f-zero and every arc in cut (S,T) is f-
saturated.
An alternating sequence P of vertices and arcs of the form v0, e1, v1, e2,
……….. , ek, vk, in which no vertex is repeated is called a semipath from v0
to vk.
Arc ei in this path is a forward edge if it is directed to vi . Otherwise it is
a backward edge in P.
A semipath P is said to be f-unsaturated if no forward path is f-
saturated and no backward edge is f-free
An f-unsaturated path is path from source to sink is called an f-
augmenting path.
For each arc ei in an f-augmenting path P, δ(ei) is defined as c(ei)-f(ei) if ei
is a forward arc and f(ei) if ei is a backward arc.
The excess flow capacity of a semipath P is δ(P) = min {δ(ei) : ei є P}
If P is an f-augmenting path with excess flow capacity δ(P), a new feasible flow
f’ can be obtained by increasing the flow of each forward edge by δ(P), and
decreasing the flow along each backward edge by δ(P) such that f’(G)=f(G) +
δ(P). Once this is accomplished, the semipath is no longer an f-augmenting path.
In other words if there is an f-augmenting path in a network, flow f is not a
maximum flow as its flow value can be increased using this augmenting path. It
turns out the converse of this assertion is also true.
In the semipath given in FIGURE-4 the flow can be increased by increasing the
flow along forward arcs by 1 unit and decreasing the flow along backward arc by
1 unit as shown in FIGURE-5
THEOREM-3
PROOF
We need to show that if there are no f-augmenting path with respect to f, f is
indeed a maximum flow.
Let S be the set of all vertices i such that there is an f-unsaturated path from
the source vertex 1 in S to i.
Obviously 1 is a vertex in S and the sink (vertex n) is not in S.
Thus there is a cut (S,T) in the network.
Let <i,j> be any arc inn this cut.
Since there are no f-unsaturated path from source to j, arc <i,j> is necessarily
saturated.
Likewise any arc in (T,S) is f-zero
So the current flow value is equal to the capacity of cut (S,T). Hence the
current flow is maximum.
THEOREM-4(FORD-FULKERSON THEOREM)
In a capacitated network, the value of maximum flow is equal to the
capacity of the minimum cut. This theorem is also known as MAX-FLOW-
MIN-CUT THEOREM
PROOF
Let f be a maximum flow
Let S be the set of vertices i such that there is a f-unsaturated path from the
source to i.
Then the complement T of S is non-empty.
Thus there is a cut (S,T)
Each arc in this cut is f-saturated and each arc in the cut in (T,S) is f-zero.
So the flow value f(G) is equal to c(S,T) which is a minimum cut.
INPUT:
Step2: Starting from the source vertex apply a breadth first search (BFS)
algorithm in D(f) to obtain a directed path from source to sink. If there is no
such path, go to step 4
Step3: The directed path in the digraph D(f) from the source to sink n
obtained in step-2 is a semipath in G with positive excess flow capacity, so it is
an f-augmenting path. Increase the flow value in the network by using this path.
Go to step 1
Step4: The maximum flow value is the outflow from the source. Let S be
the set of vertices that can be reached from vertex 1 in D(f) and let T be its
complement. (S,T) is the minimum cut.