Code Examples
  Home arrow Code Examples arrow The Ford-Fulkerson Algorithm
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

The Ford-Fulkerson Algorithm
By: Gabor Bernat
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-06-02

    Table of Contents:
  • The Ford-Fulkerson Algorithm
  • The Theory
  • Implementation issues
  • The C Code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Ford-Fulkerson Algorithm


    (Page 1 of 4 )

    The world is full of problems. Everything around us works to cause or solve some problems for us. Solving problems is a daily necessity. Of course, we deal with problems that directly relate to us. An issue like this is the flow problem inside a flow network, so how do we solve it? The answer is “The Ford-Fulkerson algorithm,” and finding out just how it works will be our goal today.

    Before I venture any deeper into this, the first and most important question is: what problems will this  solve? What benefit will you get from reading and understanding this article? You will be amazed by how many real life problems will gain an optimal and good solution from this algorithm. However, for a prime example consider this.

    Let there be a water network system. The question is, how big we should make the water pipes so that everyone can receive at any time a given amount of water? Add to this the caveat that we do not want to spend extra money on pipes that are larger than required. From this problem, it's just one step to find out if the elimination of a given military headquarters in Vietnam poses a major threat to us.

    To debate every single aspect of network flow algorithms (we are talking manly about the Ford-Fulkerson algorithm and how to use it for solving different issues), we will split the topic into two articles. In this one, the central objective will be to just understand the algorithm; how to adapt it to more complex problems is the topic for the next article.

    Furthermore, you should know that this is part of a larger article series of mine about graphs and algorithms; in fact, this is the eleventh article in a thirteen-part series. I already covered topics such as the definition of a graph, how we store graphs in memory, and the breadth-first search. I will not explain these areas again, and you need to know them to understand this article. If you missed those articles, and are not otherwise familiar with these concepts, read the articles at the links shown above before continuing. 

    What is a flow network then? It is a connected graph with weighted edges that are directed. Additionally, flow networks have a single source vertex (from which there are only outgoing edges) and a single terminal vertex (a drain vertex, which will have only incoming edges). This way we can perceive it as a network system from which the source vertex is pumping water into the network, and the terminal is collecting it and draining it out.

    More Code Examples Articles
    More By Gabor Bernat


     

    CODE EXAMPLES ARTICLES

    - Bipartite Graphs
    - Connectivity in Graphs
    - The Ford-Fulkerson Algorithm
    - Critical Paths
    - The Bellman-Ford and Roy-Floyd Algorithms
    - Shortest Path Algorithms in Graphs
    - Minimum Spanning Tree
    - Articulation Edges and Vertexes
    - Circles and Connectivity in Graphs
    - Depth-First Search in Graphs
    - Breadth-First Search in Graphs
    - The Prufer Code and the Floyd-Warshall Algor...
    - An Insight into Graphs
    - Coding a Custom Object with WSC
    - Creating a Custom Object with WSC





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek