Given a flow network, a natural goal is to arrange the traffic so as to make as efficient use as possible of the available capacity. Thus, the problem is: given a flow network, find a flow of maximum possible value.
As we think about designing an algorithm for this purpose, it is useful to consider how the structure of the flow network places upper bounds on the maximum value of an s-t flow. Suppose we divide the nodes of the graph into two sets, and , so that and . Then, any flow that goes from to must cross from into at some point, and hence will use some of the edge capacity from to .
This suggests that each such “cut” of the graph puts bound on the maximum possible flow value. The maximum flow algorithm, we are going to discuss, will have maximum flow limited to the minimum capacity of such divisions, called minimum-cut. Hence, we would require to find minimum capacity in a flow network for finding the maximum flow.
A flow function maps edges to real numbers. For an edge , refers to the flow on edge , which is also called the net flow from vertex to vertex . This notation is extended to sets of vertices as follows: If and are sets of vertices then can be defined as,
(2.4) |
First, the notation of cuts is defined, and the max-flow min-cut theorem is introduced. Then, residual networks, layered networks, and the concept of blocking flows are introduced. Finally, an efficient algorithm for finding a blocking flow is described.
An s-t cut of the graph is partitioning of the vertex into two sets and such that and . If is a flow, then the net flow across the cut is defined as . The capacity of the cut is similarly defined as,
(2.5) |
The net flow across a cut may include negative net flow between vertices, but the capacity of the cut includes only negative values, i.e., only the capacity of edges from to .
Using the flow conservation principle, it can be shown that the net flow across an s-t cut is exactly the flow value . By the capacity constraint, the flow across the cut cannot exceed the capacity of the cut. Thus the value of maximum flow is no greater than the capacity of a minimum s-t cut. The well-known max-flow min-cut theorem proves that the two numbers are actually equal. In other words, if is a maximum flow, then there is some cut such that = .
Whenever is changed, is also correspondingly changed to maintain the skew symmetry.
Most flow algorithms are based on augmenting the flow in stages. In each stage, a residual graph with respect to the current flow function is constructed and an augmenting path in is found to increase the value of the flow. Flow is increased along with this path until an edge in this path is saturated. The algorithm iteratively keeps increasing the flow until there are no augmenting paths in , and return the final flow as output.
Proof. Let be any flow in . Define to be the flow defined by the flow function for each edge . Observe that is a feasible flow in of value . Since, is the maximum flow possible in , . Similarly, define to be a flow in defined by in each edge , and this is a feasible flow in of value , and it is a maximum flow in . .
Blocking flows are also known as maximal flows. It is important to note that a blocking flow is not necessarily maximum flow. There may be augmented paths that increase the flow on some edge and decrease the flow on other edges (by increasing the flow in the reverse direction).
The maximum flow algorithm proposed by Dinitz starts with zero flow, and iteratively increases the flow by augmenting it with a blocking flow in until the vertex is not reachable from in . At each step the present flow is replaced by the sum of the present flow and blocking flow. The algorithm terminates in iterations since in each iteration the shortest distance from to in the residual graph increases. The shortest path from to is at most , and this gives upper bound of the number of iterations of the algorithm.