The minimum network flow of cutting layman

Minimum percentage

Maximum Weight closed subgraph

What closure sub-map is?

It is a directed acyclic communication FIG .

Maximum weight subgraph that is closed, nodes on the graph has both positive and negative, we have to choose the maximum weight set point.

Map building process:

  1. \(S\xrightarrow{w(i)} i\ (w(i)>0)\)
  2. \(i\xrightarrow{\infty} j\ ((i,j)\in E)\)
  3. \(i\xrightarrow{-w(i)}T\ (w(i)<0)\)

Then run the maximum flow, with \ (\ w SUM (i) \ (w (i)> 0) \) ( the weights of all is the right point and ) minus seek out maximum flow (minimum cut) is the answer.

Why has to be this way?

Category talk:

  1. If the right side is being cut, it shows that the minimum cut, the positive right side \ (\ \ leqslant) negative right opposite side (otherwise it will not cut off the right side is a positive but a negative right side), corresponding to the situation is: after the election is the right side, the negative side of the communication right is the right side of the right side is larger than the positive (in absolute value), so that it is selected from the loss, it becomes necessary to cut off (in the code is from the weight is the right point and subtracted).
  2. If the negative side is the right cut, it shows the right side is the right side than the negative large, will not lose money after the election, but chose the minimum cut off of the cost of this point is the right pay.

(I feel this is the minimum cut among the best understanding of the ......)


Choose one model

  1. If \ (A \) is cut to the \ (S \) , \ (B \) is cut to the \ (T \) , there is a corresponding expense ; ( binuclear the CPU )
  2. If a set of points to be ceded to the \ (S \) , there is a corresponding income ; ( sushi restaurant , Happiness , small crops M )
  3. If a point is to cut the \ (S \) , and a set of points \ (V '\) there is a point to cut the \ (T \) , there is a corresponding expense .

The first

\[S\xrightarrow{w(a)} a \xrightarrow{\text{代价}}b \xrightarrow{w'(b)}T\]

In this case, after the value of minimum cut, cut off is the minimum cost.

The second

Is used to minimize the cost, it can be directly solved with a minimal cut, then return it?

It does not matter, you can put together all income , then put the cost to build arcs as earnings, run minimum cut.

Thus, the cut off is minimal income , and the rest of the income is the greatest natural.

The third

(Can not remember the teacher talked about what he nailed it)

\[T\xleftarrow{w(a)} a \xleftarrow{代价} x(附加点) \xleftarrow{\infty}(v\in V')\xleftarrow{w(v)} S\]

(Painting upside down, I do not want to transfer)

(Because so few examples is not talked about, anyway, it is currently only minimal cut contact with the two models)

Guess you like

Origin www.cnblogs.com/info---tion/p/11305399.html
Recommended