From: http://blog.csdn.net/svitter
NetFlow
Ford-Fulkerson
In-depth priority search to create a stream network.
Some paths may be unreasonable.
Filter the last DFS edge again. Each side has a reverse side.
Next DFS
You can also find a path.
DFS-> abtray edge-> DFS
Stop when no new stream
Equal capacity.
* Residual network
Find the augmented path with the least variable
Search for augmented path strength through BFS
Edmonds-Karp shortest augmented Path Algorithm
Still not a good algorithm.
Poj1273 template question
Dinic fast network flow algorithm
Deep find search ?)
1. First, use BFS layering
2. A node must be removed.
3. backtracking.
4. trace back to the origin and end DFS.
5. relayer. (If the vertex cannot be reached, the algorithm ends.) Otherwise, 1 is returned.
Complexity N * n * m
The above is the largest stream
The maximum traffic on each edge of a stream.
Back up the source image, and then subtract the maximum flow traffic.
The largest stream and the upstream and downstream parts will be added later.