Shortest augmented path Algorithm (SAP):
1. Initialize capacity networks and network streams;
2. Constructs the residue network and the hierarchical network, if the meeting point is not in the hierarchical network, then the algorithm ends;
3. Continuous use of BFS augmentation in the hierarchical network, until there is no augmented road in the hierarchical network; Each augmentation is completed, in the hierarchical network to remove the saturation caused by the improved flow of the arc;
4. Go to step (2).
Continuous shortest augmented path algorithm (dinic):
1. Initialize capacity networks and network streams;
2. Constructs the residue network and the hierarchical network, if the meeting point is not in the hierarchical network, then the algorithm ends;
3. In the hierarchical network with a DFS process augmentation, DFS execution completed, the phase of the augmentation is also completed;
4. Go to step (2).
The operation steps of the shortest augmented path algorithm and the continuous shortest augmented path algorithm