has been very busy recently, in order to save time, from now on a topic to write an article.
After brushing some questions, we have the following summary:
Model Highlights:
1. Construct the flow balance, and in the case of the flow balance, find out what you want to maximize.
2. It is generally used for the judgement problem, that is, all Bender from the source point (or all Bender to the sink point). So it is often used in conjunction with the two-part answer.
3. If the answer is assumed to be i+1 when the figure is only a few more points or edges when the figure of the answer is I, then you can run through the maximum flow after assuming that the answer is I, plus the corresponding points and edges, continue to run the maximum flow. This sequence enumerates the answers, avoiding the maximum flow and re-framing each time. Many times the efficiency is higher than the two-point answer.
Related Topics:
1. Pilot pairing scheme (network flow 24 questions):
A model that matches a binary graph.
2. Minimum path Overlay (network flow 24 questions):
Because it is a DAG, you can see that the number of selected paths equals the number of vertices minus the selected number of edges. Each point can be on only one path, so in addition to the start and end points, each point has a degree of 1 in degrees. So the conversion to two points, each point I split into 2 points <si,ti> (respectively, the degree of the point I and the degree), for each edge <i,j>, The Edge <ti,sj> (Let I and j in Degrees +1). And then even <S,ti> <si,t>, each point of the degree of access can only be used once, that is not a binary map matching model? If you want to output the scheme, find all Si no matching points (ie no degrees) as the starting point, along the matching side of Dfs to find it.
3. Magic Ball (Network flow 24 questions):
The main topic: There are n pillars, in the N pillars in turn put numbers in the number of ... Ball, the ball can only be placed at the top of a pillar at a time, in the same column, any number of 2 adjacent balls is the sum of the total square. The maximum number of balls to be placed on n poles.
Note that the problem is placed in turn, so the number of small can only be placed under the number of large. So for ball I, find all satisfies (I+J) is the total square number and J>i ball J, even a side <i,j> Then the two-point answer, do the minimum path coverage with n comparison. The premise of this is to put the ball according to the number from small to large, visible in the question "in turn" importance.
4. Maximum increment sub-sequence (network flow 24 questions)
Title Description:
Given a positive integer sequence x1, x2, ..., xn.
(1) Calculates the length of its longest increment (non-descending, allowing for equal elements) of the subsequence s.
(2) Calculates the maximum number of increments of s that can be removed from a given sequence.
(3) If X1 and xn are allowed to be used more than once in the extracted sequence, the maximum number of increments of s can be removed from a given sequence.
The problem was not thought out at the time, the composition is very ingenious.
The first question: DP does not say much, f[i] represents the LIS ending with I.
Second question: Use the array of the first ask DP. For any i<j, only when A[i]<a[j] and F[i]+1==f[j] are connected to the edge <i,j>. Since each point can only be used once, it is split into two points, increasing the point flow limit to 1.
The third question: As long as the second point to remove the midpoint 1 and the traffic limit of n can be.
5. Interstellar transfer problem (network Flow 24 questions)
Main topic:
There are n individuals on Earth (the source point s), to be sent to the (meeting point T) by a bus, and then to tell you each ship's cycle and route, for at least how many days to complete the goal.
This topic made me first contact with the idea of a layered graph. If you do not break a point, you cannot represent the edge, because it will "run" according to the periodic side. According to LRJ's practice in the training guide, assuming that the answer is K days, then a point is broken into a k+1 point, which indicates the state of the point of the first day. Then it is possible to connect the edges according to the cycle and route of the transit ship. For example, there is a spaceship, 3rd day at I point, 4th day at J Point, so even edge <i3,j4> do the maximum flow to determine whether the goal can be achieved. As for the K, the binary or the enumeration can be, but the enumeration should be faster.
Maximum Flow summary && title record