Maximum flow algorithm of network flow

Source: Internet
Author: User

Maximum Flow

Definition of network flow:

In a network (with traffic) there are two special points, one is the source point of the network (s), traffic only out, one is the network's meeting point (t), the traffic is not in.

Maximum flow: Is the maximum flow for s-->t

Assuming u,v two points, the sides connecting the two points are E (u,v);

There is an actual flow f (u,v) for each edge, and a capacity of C (U,V), which is the maximum traffic that can be passed on this edge.

When the volume of an edge C (u,v) = 0, proves that this side is not present,

As a qualified network stream, three conditions must be met:

1> the actual flow per edge is less than or equal to the capacity F (u,v) <=c (U,V);

2>f (u,v) =-f (v,u);

3> for points that are not source and sink points, the incoming traffic is equal to the outgoing traffic

How to find the maximum flow for a network:

is a network flow, it is obvious that the answer is 4.

We ask for s-t flow, we can choose to solve, we start from the S point, find a s-t path, record the path of the smallest actual traffic,

The algorithm is that we have to find a lot of these paths, but these paths should be different, all we need to do is to add the minimum flow of these multiple paths to the maximum flow,

The path to finding S-t is also called the Augmented path algorithm.

In fact, the difficulty here is how to ensure that these paths are not the same which is related to a concept that is the residual network

Residual network is every time using the augmented path algorithm to find the minimum actual traffic Minn, we in the original network of the capacity of this edge minus Minn, so there must be a path to the flow of 0.

All the next augmented words, will certainly not take the original road because your traffic has 0, walking is meaningless

Maximum flow algorithm of network flow

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.