National University of Computer & Emerging Sciences
MT-3001 Graph Theory
Instructor: Miss Urooj
NETWORK FLOW
This section will focus on a new application for digraphs, one in which items are sent through a
network. These networks often model physical systems, such as sending water through pipelines or
information through a computer network.
The digraphs we investigate will need a starting and ending location, though there is no requirement
for the network to be acyclic.
Below is an example of a network. Each arc is given a two-part label. The first component is the
flow along the arc and the second component is the capacity.
The names of the starting and ending vertices are reminiscent of a system of pipes with water
coming from the source, traveling through some configuration of the piping to arrive at the sink
(ending vertex).
Using this analogy further, we can see that some restraints need to be placed on the flow along an
arc.
For example: Flow should travel in the indicated direction of the arcs, no arc can carry more than
its capacity, and the amount entering a junction point (a vertex) should equal the amount leaving.
1
The notation for in-flow and out-flow mirrors that for in-degree and out- degree of a vertex, though
here we are adding the flow value for the arcs entering or exiting a vertex.
The requirement that a flow is non-negative indicates the flow must travel in the direction of
the arc, as a negative flow would indicate items going in the reverse direction.
The final condition listed above requires no in-flow to the source and no out-flow from the
sink.
This is not necessary in theory, but more logical in practice and simplifies our analysis of
flow problems.
The network 𝐺8 shown above satisfies the conditions for a feasible flow. In general, it is easy
to verify if a flow is feasible.
Our main goal will be to find the best flow possible, called the maximum flow.
Maximum Flow:
Intuitive Idea to Find Maximum Flow:
Look back at the flow shown in the network 𝐺8 above, which has a value 3. If we compare the flow
and capacity along the arcs, we should see many locations where the flow is below capacity.
However, finding a maximum flow is not as simple as putting every arc at capacity this would likely
violate one of the feasibility criteria.
For example: if we had a flow of 5 along the arc ad, we would need the flow along dt to also equal
5 to satisfy criteria (3). But in doing so we would violate criteria (2) since the capacity of dt is 3.
Question: The main question in regard to network flow is that of optimization, what is the value of
a maximum flow?
Answer: We will discuss an algorithm that not only finds a maximum flow but also provides proof
that a larger flow cannot be found.
2
Slack & Chain:
Slack will be useful in identifying locations where the flow can be increased.
For example, in the network above k(sa) = 3, k(sc) = 3, and k(sb) = 0 indicates that we may
want to increase flow along the arcs sa and sc but no additional flow can be added to sb.
The difficult part is determining where to make these additions.
To do this we will build special paths, called chains, that indicate where the flow can be
added.
In the network shown above, both sadt and sadeht are chains, though only sadeht is not a directed
path since it uses the arc ed in the reverse direction.
o We now have all the needed elements for finding the maximum flow. The algorithm below is
similar to Dijkstra’s Algorithm.
AUGMENTING FLOW ALGORITHM:
The format of the Augmenting Flow Algorithm, described below, is an adaption from that given in
[79] and based on the Ford-Fulkerson and Edmonds-Karp Algorithms.
Vertices will be assigned two-part labels that aid in the creation of a chain on which the flow
can be increased.
The first part of the label for vertex y will indicate one of two possibilities: x− if there is a
positive flow along y → x, or x+ if there is slack along the arc x → y, where the former
scenario may allow a reduction along the arc yx in order for additional flow along another
edge out of x, whereas the latter scenario may allow more flow along the arc xy itself.
The second part of the label will indicate the amount of flow that could be adjusted along the
arc in question.
3
Note:
It is important that in Step 2 when we are labeling the neighbors of a vertex x that we first consider
arcs into x from unlabeled vertices that have positive flow (part a) and then the arcs out of x to
unlabeled vertices with positive slack (part b). These are used to find a chain from s to t onto which
flow can be added.
4
5
6
7
8
Remark:
When the Augmenting Flow Algorithm halts, a maximum flow has been achieved.
The main idea will be to determine a barrier through which all flow must travel and as a
consequence, the maximum flow cannot exceed the barrier with minimum size.
The source and sink will be on opposite sides of this barrier, which is more commonly called
a cut.
Remark:
A cut is a separating set that is reminiscent of an edge-cut, except that we are not concerned with
disconnecting a graph but rather describing all arcs originating from one portion of the digraph and
ending in the other portion.
9
The difficulty in using this result to prove a flow is maximum is in finding the minimum cut.
We can use the vertex labeling procedure to obtain our minimum cut.
By finding a flow and cut with the same value, we now have proof that the flow is indeed
maximum.
10
Remarks:
In practice, we can perform the Augmenting Flow Algorithm and the Min-Cut Method
simultaneously, thus finding a maximum flow and providing a proof that it is maximum (through
the use of a minimum cut) in one complete procedure.
11