Network Flow

A whole class you haven't touched: flow networks. Learn Ford-Fulkerson and maximum flow.

54 lessons
157 min

Lessons

1. Intro

(Why flow matters)

3m

2. Flow Networks

Directed graph with capacities

3m

3. Flow Assignment

(How much flow on each edge)

3m

4. Example Flow

(Simple network walkthrough)

3m

5. The Max Flow Problem

(Find maximum throughput)

3m

6. Residual Graph

(Captures remaining capacity)

3m

7. Augmenting Path

(Path that increases flow)

3m

8. Quiz: Residual Graph

Knowledge check

2m1 problems

9. Ford-Fulkerson Method

Iterative augmentation fram...

3m

10. Why It Works

(Correctness argument)

3m

11. Edmonds-Karp Algorithm

BFS for shortest augmenting...

3m

12. Pseudocode - Edmonds-Karp

(BFS-based max flow)

3m

13. Residual Capacity Update

(Forward and backward edges)

3m

14. Implementation Details

Adjacency list with capacities

3m

15. Time Complexity

(Edmonds-Karp analysis)

3m

16. Quiz: Edmonds-Karp Complexity

Knowledge check

2m1 problems

17. Problem - Download Speed

(CSES 1694)

3m1 problems

18. Download Speed - Modeling

(Direct translation to flow)

3m

19. Download Speed - Implementation

(Edmonds-Karp code)

3m1 problems

20. Download Speed - Walkthrough

(Example with 4 nodes)

3m

21. Download Speed - Edge Cases

(No path, single edge)

3m

22. Cuts and Capacity

(Partitioning the graph)

3m

23. Min-Cut

(Cut with minimum capacity)

3m

24. Max-Flow Min-Cut Theorem

(Duality result)

3m

25. Finding the Min-Cut

Run BFS on final residual g...

3m

26. Quiz: Max-Flow Min-Cut Theorem

Knowledge check

2m1 problems

27. Problem - Police Chase

(CSES 1695)

3m1 problems

28. Police Chase - Core Idea

Unit capacities mean edge-d...

3m

29. Police Chase - Extracting the Cut

(BFS on residual graph)

3m

30. Police Chase - Implementation

Edmonds-Karp + cut extraction

3m1 problems

31. Police Chase - Walkthrough

(Example with 4 cities)

3m

32. Bipartite Matching

(Classic flow application)

3m

33. Problem - School Dance

(CSES 1696)

3m1 problems

34. School Dance - Graph Construction

(Source and sink setup)

3m

35. School Dance - Extracting Pairs

(Check flow on middle edges)

3m

36. School Dance - Implementation

(Bipartite matching via flow)

3m1 problems

37. School Dance - Walkthrough

(Example with 3 boys, 2 girls)

3m

38. School Dance - Edge Cases

(Unbalanced sides, no edges)

3m

39. Quiz: Bipartite Matching via Flow

Knowledge check

2m1 problems

40. Multiple Sources and Sinks

Reduction to single source/...

3m

41. Vertex Capacities

(Split nodes into in/out)

3m

42. Flow with Lower Bounds

Forcing minimum flow on edges

3m

43. Integer Flow Theorem

Integral capacities yield i...

3m

44. Disjoint Paths

(Counting independent routes)

3m

45. When to Use Flow

(Recognizing flow problems)

3m

46. Common Mistakes

(What to avoid)

3m

47. Quiz: Node Capacity Modeling

Knowledge check

2m1 problems

48. Faster Algorithms

(Beyond Edmonds-Karp)

3m

49. Flow in Practice

(Real-world applications)

3m

50. Vocabulary - Augmenting Path

(Path that increases flow)

3m

51. Vocabulary - Residual Graph

Remaining capacities after ...

3m

52. Vocabulary - Cut

Partition separating source...

3m

53. Practice Tips

(How to get good at flow)

3m

54. Section Recap

(What you learned)

3m

Practice Problems

1.
2.
3.
Soldier and TravelingCodeforceshard
4.
Array and OperationsCodeforceshard

Ready to start learning?

Access all 54 lessons with interactive content and progress tracking.