[Bzoj 1497] [NOI 2006] Maximum profit (maximum weight closed sub-chart)

Source: Internet
Author: User

Title: http://www.lydsy.com:808/JudgeOnline/problem.php?id=1497

Analysis:

This is a problem in the graph, and the edge is dependent on the point, there is a dependency between the points in the graph and the edges, you can consider the maximum right closed sub-graph

Suppose an edge between A and b that has a value of C (according to test instructions is a bidirectional edge)

Then we can build a new node, the weight of the point is C, and point to point A and point B (unidirectional), while breaking the two-way edge between the original, A, B, the weight of the point is their cost (negative)

Then the problem of the original problem is converted to the maximum right of the closed sub-graph.

————————————————————————————————————————————————————————————————

Most powerful closed sub-graph

Definition: To select a point set V ' in the graph, must meet for each point in V ', its successor also in V ', select a bit of weight and the largest point set V '

Algorithm:

To get a source point S, the meeting point T,s the point that the ownership value is positive, the capacity is the weighted value of the point, the point that the ownership value is negative to the T, and the absolute value of the weight of the point.

Then the maximal weight closure sub-graph is equal to the minimum cut, and then the maximum flow problem is converted.

Proof: http://wenku.baidu.com/link?url=Q7LKOvCRFeMQkY1WulrZTAHjN3ud8gbhuqUOKwPbwmGDAmCB0_ urdekj59wkwvrgn9xsg9tgbwsmhhbimxvgs2wmbenrxre6zuseo2v3mx7

——————————————————————————————————————————————————————————————————

In fact, this problem has a better algorithm, see the 2007 Training Team paper

[Bzoj 1497] [NOI 2006] Maximum profit (maximum weight closed sub-chart)

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: info-contact@alibabacloud.com 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.