The matching problem of graphs and maximum flow problem (Ii.) Ford-fulkerson method of maximum flow problem

Source: Internet
Author: User

This article to undertake the last article, mainly explained the maximum flow problem Ford-fulkerson solution. But this is a method, not an algorithm, because it contains several implementations with different running times. The method relies on three important ideas: residual networks, augmented paths and cuts. This is covered in detail in this article, and we provide a Java implementation of the method in the next article.

Before introducing three concepts, we briefly introduce the basic idea of the Ford-fulkerson method. The first thing to understand is that Ford-fulkerson is an iterative approach. At the beginning, all u,v belong to the V,f (u,v) =0 (where F (u,v) represents the current flow of the side of U to v), i.e. the value of the initial state Shireu is 0. In each iteration, you can increase the flow value by looking for an "augmented path." The augmented path can be viewed as a path from the source point S to the meeting point T, which can be pressed into more streams, thereby increasing the value of the stream. Repeat this process until the augmented path is found.

For example, as shown in the figure, each red line represents an augmented path, and the current flow of S to T is 3.

Of course, this is not the maximum flow of the network, according to the search for augmented path algorithm we can actually continue to look for augmented path, the ultimate maximum flow network as shown in the following figure, the maximum flow is 4.

Next we'll explain how to find an augmented path. Before we introduce the augmented path, we first need to introduce the concept of a residual network.

First, the residual network

As the name suggests, a residual network is a network of a given network and a stream that corresponds to a stream that can be accommodated. Specifically, it is assumed that a network g= (v,e), its source point S, the meeting point T. Set a stream in F to G, corresponding to the flow of vertex u to vertex v. In the case of C (U,V) (c for Side capacity), the additional network traffic that can be pressed between U and V is the residual capacity (residual capacity) of the Edge (U,V) as follows:

R (u,v) =c (U,v)-F (u,v)

For example, suppose (u,v) that the current flow is 3/4, then the C (u,v) =4,f (u,v) = 3, then r (u,v) = 1.

We know that there is such a rule in the network stream. There are 3 units of traffic from U to V, so from the opposite direction, that is, from V to u there are 3 units of residual network, then R (v,u) = 3. It can be understood that from U to v there are 3 units of flow, then from V to u have the ability to the 3 units of the flow of pressure back.

Let's take a specific look at an example of a streaming network as shown in the following figure

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.