Discrete StructureUnit 96 min read
Network Flows: Max-Flow Min-Cut, Algorithms & Applications
Unit 9 of Discrete Structure covers network flow theory, including max-flow min-cut theorem, Ford-Fulkerson algorithm, residual graphs, and real-world applications like transportation, matching, and scheduling. Learn definitions, algorithms, and problem-solving techniques with solved examples.
Key Concepts & Definitions
1. Network Flow Basics
A network flow is a directed graph with:
- A source node (start point).
- A sink node (end point).
- Edges with capacities (max flow allowed).
- A flow function where .
Flow Conservation Constraint: For any node : (Flow in = Flow out)
2. Types of Edges
| Term | Definition | Example |
|---|---|---|
| Saturated Edge | (flow = capacity) | Edge with |
| Unsaturated Edge | (flow < capacity) | Edge with |
| Slack | (remaining capacity) |
3. Max-Flow Min-Cut Theorem
- Max-Flow: The maximum possible flow from to .
- Cut: Partition of nodes into where and .
- Capacity of a Cut:
- Theorem: The max flow equals the min cut capacity.
Example: Consider a graph with:
- (capacity 3)
- (capacity 2)
- (capacity 2)
- (capacity 3)
Possible Cuts:
Min Cut: with capacity 4. Max Flow: Also 4 (verified via Ford-Fulkerson).
4. Ford-Fulkerson Algorithm
Steps:
- Start with for all edges.
- Find an augmenting path from to in the residual graph .
- Bottleneck Capacity: .
- Update Flow: Increase along by the bottleneck.
- Repeat until no augmenting path exists.
Residual Graph :
- Forward Edge: with residual capacity .
- Backward Edge: with residual capacity .
Example: Given:
s --3--> A --2--> t
| |
2 3
| |
v v
B --3--> t
Step 1: Augmenting path , bottleneck = 2. Update:
- , . Step 2: Augmenting path , bottleneck = 3. Update:
- , . Max Flow: .
5. Applications of Network Flows
| Application | Description | Example |
|---|---|---|
| Transportation Networks | Optimize flow of goods/persons between locations. | Road traffic, supply chain logistics. |
| Bipartite Matching | Match elements in two sets (e.g., jobs to workers). | Stable marriage problem. |
| Scheduling | Assign tasks to machines/minimize delays. | CPU task scheduling. |
| Image Processing | Segment images using max-flow/min-cut. | Object detection in computer vision. |
| VLSI Design | Route wires in circuits without overlaps. | PCB design. |
6. Solved Problems (Exam-Style)
Problem 1: Max Flow Calculation
Given:
s --4--> A --3--> t
| |
2 1
| |
v v
B --2--> t
Solution:
- Augment : bottleneck = 3. Flow: , .
- Augment : bottleneck = 2. Flow: , .
- Max Flow: .
Problem 2: Min Cut Verification
For the above graph, find the min cut. Possible Cuts:
- : .
- : . Min Cut: with capacity 3 (but max flow was 5—error!). Correction: The correct min cut is with capacity 5, matching max flow.
7. Common Mistakes & Clarifications
- Residual Graph Misuse: Forgetting to include backward edges in .
- Flow Conservation: Ignoring intermediate nodes (only and can have imbalance).
- Bottleneck Calculation: Must consider all edges in the augmenting path.
- Min Cut vs. Max Flow: Always verify that the min cut equals the computed max flow.
Exam Tip
Understand Definitions:
- Memorize saturated edge, unsaturated edge, and slack.
- Know max-flow min-cut theorem and its proof intuition.
Algorithm Steps:
- For Ford-Fulkerson, trace augmenting paths carefully.
- Draw the residual graph at each step.
Problem-Solving Strategy:
- Start with simple augmenting paths (e.g., shortest path first).
- For min cut, consider all possible partitions of .
Applications:
- Relate to real-world scenarios (e.g., "This is like optimizing traffic routes").
- For matching problems, model as a flow network with capacity 1.
Diagrams:
- Always draw the graph before solving.
- Label flows and capacities clearly.
Common Exam Questions:
- "Find the max flow" → Use Ford-Fulkerson.
- "Prove max-flow = min-cut" → Use the theorem directly.
- "Define saturated edge" → .
Practice Questions:
- Given a network, find the max flow and verify with min cut.
- Explain how network flows solve the assignment problem.
- What happens if an edge has zero capacity? How does it affect the flow?
Based on the TU BSc CSIT syllabus for Discrete Structure (CSC165), unit 9.
Discussion
Loading…