This section describes the basic idea of the maximum flow algorithm.
First, set the maximum capacity of the entire network to 0.
Then increase the traffic at the first side to reach the maximum traffic.
Increase the traffic on the second side to reach the maximum traffic.
Increase the traffic on the third side to reach the maximum traffic. Note that there is a reverse edge (called backward arc) in the figure ). The backward arc function is to move the traffic in the backward arc to another line to increase the traffic.
Similarly, there is a reverse arc in the fourth side, and more traffic is increased through the reverse arc.
The algorithm ends by determining that all paths meet any of the following conditions:
This is the basic idea of the Ford-Fulkerson Algorithm. The subsequent sections will continue to introduce algorithms and provide specific code.