Graph theory algorithm on the shortest two or three of the maximum circulation

Source: Internet
Author: User

Another high-quality blog.

This problem can be used BZOJ1001 as an example,

First, let's take a picture.

This picture has 6 points, 10 sides, and each edge has edge rights.

So what is the maximum flow minimum pinch?

Explained below

In a plan, the maximum amount of traffic that can be reached from the point of fact to the end is equal to the minimum capacity of the set of edges that can cause a network stream to break if removed from the network.

So how does this problem change to the shortest-circuit problem pinch

One more picture.

The difference here is that we have created two new edges, one from the 1 to infinity left side as the Origin point, and one from the 6 to infinity right side as the end point.

We've created 7 new points for 0 to 6, each of which is defined as a small area separated by the original Benche.

Then each previous edge is redefined as a link to the newly created two point adjacent to this edge

So this is the picture.

The Benquan of each edge is the weighted value of the edge tangent to the current edge

Then we will find that the minimum cut of this graph is the single source shortest path from the starting point to the end of the new diagram .

Then we'll be naked SPFA or Tarjan.

Share Examples link : http://www.cnblogs.com/PencilWang/p/5874536.html

Graph theory algorithm on the shortest two or three of the maximum circulation

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.