Ford-Fulkerson, dinic, ISAP, and EK are all SAP
It is based on finding a shortest short circuit and then performing an increment.Algorithm
However, sap in general should beISAP (improved shortest augmenting paths)
He doesn't need to use BFs to find a shortest path like Ek, and then perform the increment operation.
Instead of searching for the path again, we only need to find the shortest path, and then calculate the shortest distance from the shortest path.
Therefore, the bfs o (e) time can be reduced to O (V). Therefore, the ek O (VE ^ 2) can be reduced to O (V ^ 2e)
The time interval is the same as that of dinic.
Algorithm step:
1. Perform BFS on the sink to find the shortest distance from the sink (in fact, this step is not required, but it should be set to zero from the sink)
2. The source serves as the frontend, and finds out the distance from this point to the sink, which is 1 less than the distance from the original point to the sink.
3. If such a point exists, the point will be used as the first point for searching
If this is sink, find the maximum stream of the worker and modify the residual graph along the incremental path.
If such a point does not exist, modify the distance value to find the point to which the previous point is reached, and the amount of traffic consumed during the past period needs to exist, find the shortest point between Sink and sink.
And update the distance from the current vertex to the distance value + 1, and set the previous vertex to the previous vertex.
4. Until the source does not have a route entry to the sink
The operation time is the same as that of dinic, and the effect is not satisfactory. Unfortunately, it cannot be listed.
It can be seen that my maximum stream is still not fast ....
[Transfer] http://kuoe0.pixnet.net/blog/post/18790432-%5Balgorithm%5Dmax-flow---sap---improved-shortest-augmenting-pat