Ford-Fulkerson Algorithm for Max Flow Problem

An Edmonds-Karp implementation to solve the Max-flow Min-cut Problem
615 Downloads
Updated 23 Nov 2017

View License

See details of the Max-flow problem in http://www.geeksforgeeks.org/ford-fulkerson-algorithm-for-maximum-flow-problem/
The first example in the code (as well as the thumbnail image) is taken from the same website above.

This MATLAB code works with an adjacency matrix to represent the graph. It also contains the function "findpath" which is a BFS (Breadth-first search) implementation for finding augmenting paths. Paths are stored using a predecessor array. I tried to make the code look elegant. :)

The output is the maximum flow and the residual graph.

Cite As

Karl Ezra Pilario (2024). Ford-Fulkerson Algorithm for Max Flow Problem (https://www.mathworks.com/matlabcentral/fileexchange/65167-ford-fulkerson-algorithm-for-max-flow-problem), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers
Acknowledgements

Inspired: Rearranging Rows for Gauss - Seidel Method

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0