A little method for maximum flow mapping of network flow minimum cost

Source: Internet
Author: User
Situation of the graph without direction

Add the edge of the time directly add two edges can, because this dinic algorithm can be sentenced to heavy edge
POJ 3469 Code

When the minimum flow rate is determined

Add two source points and meeting points
First two source points connected, meeting point connected, capacity for determined traffic
POJ 2135 Code
POJ 3686 Code

Multi-source multi-sinks

Add a source point and a meeting point
Connect the source point and each previous capacity to 1
Connect the meeting point and each previous capacity to 1
POJ 3281 Code
POJ 2195 Code

Copyright notice: All brothers, please feel free to reprint, please indicate who is the brother

A little method for maximum flow mapping of network flow minimum cost

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.