Algorithm 9-2: Maximum stream Ford-Fulkerson Algorithm

Source: Internet
Author: User

This section describes the basic idea of the maximum flow algorithm.


First, set the maximum capacity of the entire network to 0.



Then increase the traffic at the first side to reach the maximum traffic.



Increase the traffic on the second side to reach the maximum traffic.



Increase the traffic on the third side to reach the maximum traffic. Note that there is a reverse edge (called backward arc) in the figure ). The backward arc function is to move the traffic in the backward arc to another line to increase the traffic.



Similarly, there is a reverse arc in the fourth side, and more traffic is increased through the reverse arc.



The algorithm ends by determining that all paths meet any of the following conditions:

  • The capacity is full.

  • The reverse arc is empty.



This is the basic idea of the Ford-Fulkerson Algorithm. The subsequent sections will continue to introduce algorithms and provide specific code.

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.