Minimum Cut on a Graph Using a Maximum Flow Algorithm
Minimum Cut on a Graph Using a Maximum Flow Algorithm
Algorithm
1. Overview
In this tutorial, we’ll discuss how to find the minimum cut of a graph by calculating the
graph’s maximum flow. We’ll describe the max-flow min-cut theorem and present an
algorithm to find the maximum flow of a graph.
Finally, we’ll demonstrate the algorithm with an example and analyze the time complexity of
the algorithm.
In general, a cut is a set of edges whose removal divides a connected graph into two
disjoint subsets. There are two variations of a cut: maximum cut and minimum cut. Before
discussing the max-flow min-cut theorem, it’s important to understand what a minimum cut
is.
Let’s assume a cut partition the vertex set into two sets and . The net
flow of a cut can be defined as the sum of flow , where are
two nodes , and . Similarly the capacity of a cut is the
sum of the individual capacities, where are two nodes , and .
The minimum cut of a weighted graph is defined as the minimum sum of weights of
edges that, when removed from the graph, divide the graph into two sets.
Let’s see an example:
Here in this graph, is an example of a minimum cut. It removes the edges
and , and the sum of weights of these two edges are minimum among all other cuts in this
graph.
The max-flow min-cut theorem states that the maximum flow through any network
from a given source to a given sink is exactly equal to the minimum sum of a cut. This
theorem can be verified using the Ford-Fulkerson algorithm. This algorithm finds the
maximum flow of a network or graph.
Let’s define the max-flow min-cut theorem formally. Let be a flow network,
a flow on . The value of the maximum flow from the source to the sink is equal to the
capacity of the minimum cut separating and :
The Ford-Fulkerson algorithm is based on the three important concepts: the residual
network augmented path and cut. We already discussed cut in a graph.
The algorithm starts with a workable flow through the graph, and the flow is improved
iteratively.
If this flow is maximum, it makes it possible to determine the flow function satisfying this
value as well as the minimum cut. If the flow is not maximum, its objective is to highlight an
improving path corresponding to this flow.
Initially, the algorithm starts by setting the flow value between the source and sink node to
. At each iteration, we find an augmented path and increase the flow value. We’ll
terminate the algorithm and return the flow value when no more augmented paths can be
found.
5.3. Pseudocode
6. Example
Initially, we’re taking a directed connected graph, and we’ll run the Ford-Fulkerson algorithm
on it. In each step, we pick an augmented path and present the residual graph and Netflow
graph:
First, we choose the path . In this path, the minimum capacity is . Now we’ll
construct a residual graph and a Netflow graph:
We’ll continue the algorithm and select the next augmented path :
Our next pick is :
Now let’s observe the residual graph, and let’s see if we can find more augmented paths:
If we see the current residual graph from the source node , we can’t reach the sink node
via a path. Therefore, we terminate the algorithm as we can’t find any more augmented paths.
Now according to the algorithm, the maximum outgoing flow from the sink node should be
equal to the maximum incoming flow of the source node. Let’s verify this.
The maximum outgoing flow from the node is and also the maximum incoming
flow for the source node is , Hence, we verified that the Ford-Fulkerson algorithm
works fine and provides the maximum flow of a graph correctly.
Now according to the maximum-flow minimum-cut theorem, the minimum cut of this graph
would be equal to the maximum flow of the graph. Therefore, the minimum cut of this
example graph is .
The Ford-Fulkerson algorithm depends heavily on the method used to find an augmented
path. An augmented path can be found using a Breadth-first search (BFS) or Depth-first
search (DFS). If we choose an augmented path using BFS or DFS, the algorithm runs
in polynomial time.
The execution time of BFS is equal to , where is the number of edges in the
residual graph . For each edge, the flow will be increased, and in the worst case, it reaches
its maximum flow value . Therefore the algorithm will be iterated at most times.
Hence, the overall time complexity of the Ford-Fulkerson algorithm would
be .
8. Conclusion
In this tutorial, we discussed how to find a minimum cut by calculating the maximum flow
value of a graph. We presented the Ford-Fulkerson algorithm to solve the maximum flow
problem in a graph.
To find the minimum cut of a graph, we discuss the max-flow min-cut theorem. Finally, we
verified the Ford-Fulkerson algorithm with an example and analyzed the time complexity.