|
In the past few days, I have read Zhou Yuan's "a simple method to solve Network Flow Problems with the upper and lower limits of traffic" and completed sgu 194 & zoj 2314 Reactor Cooling, sgu 176 flow construction and hoj 2135 & poj 2396budget.
As mentioned in Zhou Yuan's article, reactor cooling is the feasible stream for solving the problem of the minimum and maximum flow of the upstream and downstream networks. In this network, the Condition B (u, v) <= f (u, v) <= C (u, v) must be met, that is, the network traffic of this inapplicable sink has upstream and downstream constraints.
Set f (u, v) = B (u, v) + g (u, v) (*), obviously 0 <= g (u, v) <= C (u, v)-B (u, v ). If (*) is substituted into the traffic balancing condition, then we obtain the [B (U, I) + g (u, I)] = Σ [B (I, V) + g (I, V)] => Sigma g (I, V)-sigma g (u, I) = Sigma B (U, I)-sigma B (I, v ). If M (I) = Sigma B (U, I)-sigma B (I, V) is set, that is, M (I) this is the sum of the lower bound of inbound node I minus the sum of the lower bound of outbound I.
So far, an additional network with only the upper limit of traffic can be constructed as follows: adding the appended source S and the appended sink T, M (I) in the original network is not negative, then c '(s', I) = M (I), otherwise c '(I, T') =-M (I ); in the original network, any node u and node v connected by an arc are in the attached network. The Arc C' (u, v) = C (u, v)-B (u, v ).
In this way, if the attached network is full, a feasible stream exists in the original network. To determine whether the append network can be full, you can determine by solving the maximum stream of the append network. If the stream is full, there is a solution; otherwise, there is no solution.
After you understand this problem, you can proceed to the next step to solve the maximum and minimum flow problems in the Upper and Lower Bound networks.
Add an arc (t, s) to make the original network a network with no source sink. If the maximum stream is obtained, B (t, s) = A, C (t, s) = inf; if the minimum stream is obtained, B (t, s) = 0, C (t, s) =. You can use the bipartite enumeration method A to construct an additional network and determine whether a feasible stream exists in the attached network. In the end, a is what you want.
This method is easy to implement, and the price required is to solve the maximum stream multiple times. The complexity is O (logf maxflow (V, E )). |