Some Simple network flow models

Source: Internet
Author: User

One, the most powerful closed diagram

For a graph (V, E) consists of a point set V and some set E, each point has a certain weight, for a legitimate subset, if there is a forward edge (u,v) and u in a subset, V must also in the subset, the subset of all element weights and the largest subset

Analysis: Consider each point has two conditions, select and do not choose, so consider the minimum cut, but the maximum cost;

First assume that all the positive points are taken, from the origin to all the positive points of the connecting edge, from all negative weights to the meeting point edge, the capacity is the absolute value of the weight,

For a cut [s,t] (the point within S indicates the selected point),

The right point in S, indicating that the selected point, and S connected to the edge is not cut, if in T, indicating that the point is cut, then the weight should be subtracted from the cutting edge,

Similarly, for the negative weight point, initially did not elect him, if in S, then to T's Edge is cut, the weight minus the cost, if within T, still not selected, and T's Edge is not cut, then the weight is unchanged

Consider limitations

In accordance with the above method of the selected points in the original image is not with the point in the T has edges, in other words, and T in the cost of the edge is INF, then for the original image in the direction of a beginning end of the same capacity as the edge of the INF, if the starting point belongs to the S endpoint belongs to t the edge in the cut In this way the minimum cut must not contain the edge, that is to say, the smallest cut of the s set where the point must not be connected with the point in T.

In fact, it is very good to understand this one-to-all correspondence, and the strict proof can be found in the application of the minimum cut model in the informatics competition--Hubertau

And why is it that the cost of connecting with T is INF?

Because here can be flexible, it can not be INF, such as bzoj1391 [ceoi2008]order This problem to change the INF to rent the cost of it.

Two or two the minimum point weight cover set of the fractal graph

For a diagram (V, E) consists of a point set V and some non-bound set of E, each point has a certain weight, for a legitimate subset, if there is a non-edge (u,v) u,v at least one point in the subset, the subset of all element weights and the smallest subset

The two sides of the two graph are X and Y, and the following (u,v) u belongs to x,v belonging to Y

For an edge (U,V), from S to u a capacity of Val (U) edge, from V to T with a capacity of a Val (v) Edge for a cut [s,t], from U to V also connected to an edge, because the nature of the cut does not exist a path from S to T, so there is at least one of these three edges is cut, We do not want the edge of U to V to be cut in the smallest cut, so the flow is the INF

If the point in Y is within S, then the connecting edge of T is bound to be cut (representing the selected point), and in t it is not cut (for this point not chosen),

If the point in X is within T, then the connecting edge of S is bound to be cut (representing the selected point), and in s it is not cut (the point is not chosen).

Selecting all x points in T and T in S points must be a cover set because at least one of the s->u and u->t two edges is cut

So the minimum cut is the answer.

In particular, if each point is 1, we find that the graph with the maximum matching of the two graphs is the same, and this is the reason for the maximum matching number of the binary graph = minimum point coverage.

Three or two maximum weight independent set of graphs

It is easy to prove that the complement of each covering set is a separate set, and that the complement of each independent set is also a cover set, so it is OK to subtract the minimum coverage set with the total weight value.

In particular, this is the reason why the maximum number of =n-matches the maximum independent set of two graphs.

Some Simple network flow models

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.