1. Non-source sink upstream and downstream feasible streams
For a directed edge (u, v), the upper bound is A, and the lower bound is B:
(1) the SS to V capacity is B
(2) The capacity from u to TT is B.
(3) The capacity from u to V is a-B.
Calculate the maximum SS-TT stream. A Feasible stream exists only when maxflow = sigma (I, t) = sigma (S, I ).
2. The smallest stream at the upper and lower bound of the Source Sink
If the source image has no source sink, you must first convert it to a source sink.
For other points, such as the method 1, create a graph, and add the t-s capacity to INF.
Calculate the maximum SS-TT stream. In this case, the traffic of S-T is the traffic of the reverse edge of t-s, which is recorded as X
Delete the t-s edge in the residual network. The specific method is E [I]. V: = 0 e [I XOR 1]. V: = 0.
Calculate the maximum t-s stream (note that it is t-s), and record that the maximum flow is Y
The minimum feasible stream is x-y (it can be understood as a feasible stream, and some useless streams are removed)
3. Maximum stream at the upper and lower bound of the Source Sink
The figure is as follows: 2. After the maximum SS-TT stream is obtained, the maximum stream of S-T is obtained directly on the residual network without recording or deleting edges. That is, the answer
(It can be understood that, after finding a feasible stream and finding that more streams are available, the maximum stream s-t can be used without deleting edges .)
This is because S-T traffic exists in S-t, when the maximum stream of S-T is run, it is included in the answer)
Please note