03_Network_Flows_Ford_Fulkerson
2 itemsREADME.md
Network Flows - Ford Fulkerson
Algorithm
- Copy capacity matrix to residual matrix.
- Find an augmenting path from source to sink using DFS.
- Find minimum edge capacity on that path (bottleneck flow).
- Subtract bottleneck from forward edges in residual graph.
- Add bottleneck to backward edges in residual graph.
- Add bottleneck to total max flow.
- Repeat until no augmenting path exists.
Time Complexity
- O(E * maxFlow) for integer capacities (common bound)
Space Complexity