No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Ford-Fulkerson algorithm

3.0 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 1.07 KB File ID: #19439 Version: 1.0

Ford-Fulkerson algorithm


Bing He (view profile)


02 Apr 2008 (Updated )

The Ford-Fulkerson algorithm (named for L. R. Ford, Jr. and D. R. Fulkerson) computes the maximum fl

| Watch this File

File Information

Main function is function max_flow=ff_max_flow(source,sink,capacity,nodes_number).
The graph is expressed as N by N adjacency matrix. N is the number of vertices in the graph, i.e., "nodes_number". "source","sink" are identified by the node ID. "capacity" is an N by N matrix express the edge capacity. "max_flow" is output max flow found.

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
21 Jun 2015 Mohamed Farrag

guys I'm new to matlab , could you please any one tell me how to run this code ?
When I run it directly it gives me error:

Error using ff_max_flow (line 3)
Not enough input arguments.

Comment only
21 Mar 2012 luo luo

Why I can not get the right max flow? whatever the capacity matric is, the result of max flow is always zero. Is the code feasible?

27 Nov 2010 kedar

kedar (view profile)

17 Feb 2010 Ahmed Hassan

when I enter the set(h.Nodes(K(1,:)),'Color',[1 0 0]) to View Minimum Cut the message appear ??? Undefined variable "h" or class "h.Nodes". please what can I do?

Comment only
12 May 2009 Mango

Mango (view profile)

just follow the description, first create your matrix from command line, then use the command

max_flow=ff_max_flow(number of sources,number of sinks, matrix name, number of nodes)

it will give you the output max_flow =
or just find maximum flow min cut using

Comment only
08 May 2009 Manar

Manar (view profile)

Please provide an example very quickly

Comment only
16 Oct 2008 Ahmed Rizk

Please provide an example
Best Regards

Comment only
09 Aug 2008 Gok s

Please provide an example

Comment only

Contact us