CS101 Discrete Mathematics
Maximum Flow Problem
Dhananjay Goel - 2021CSB1165
Hardik Aggarwal - 2021CSB1173
Problem Description
The problem involves determining the most amount of flow that can be sent via a system of
pipes, channels and other paths while taking into account the capacity restrictions.
The Directed edge from S to A has
maximum capacity of 7 and 0
depicts the amount of flow from
the edge. There can be numerous
Source Sink paths to follow to reach sink from
source.
How to find the Maximal Flow?
1 Ford-Fulkerson's Algorithm
2 Edmonds-Karp's Algorithm
3 Dinic's Algorithm
4 Capacity Scaling Heuristic
Ford-Fulkerson Algorithm
Path S-A-B-t
Uses DFS to find augmenting paths
A
A Path S-D-A-C-t
B
C Path S-D-C-B-t
D
Path S-A-D-C-t
Edmonds Karp Algorithm
Capacity Scaling Heuristic
Adjust the size of each
edge based on the
capacity value highlighting
the edges that should be
given priority while finding
maximal flow
Workflow
U = largets edge capacity
Δ = largest power of 2 less than or equal to U
U = 14
Δ= 8
Δ= 4
Δ= 2 Δ= 1
Dinic's Algorithm
Why take a detour? The main
idea behind this algorithm is to
guide augmenting paths from
source to sink using a level
graph and thus reducing the
runtime
Conclusion
Applications
Transportation Networks - Optimizing the flow of traffic, passengers or goods through the
network minimizing congestion and maximizing efficiency.
Disaster Mangement - It can be used to determine evacuation routes, resource allocation
and logistics planning during emergencies
Image Segmentation - Treating image as a graph, the algorithm finds the optimal boundary
between different regions based on flow of pixels
Water Management- Determining the optimal distribution of water resources in irrigation
networks, hydroelectric power generation, or water supply networks
Thank You