upgrade
upgrade

📊Graph Theory

Key Concepts in Network Flow Algorithms

Study smarter with Fiveable

Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.

Get Started

Why This Matters

Network flow algorithms sit at the heart of optimization problems you'll encounter throughout graph theory and computer science. These algorithms model how resources—whether data packets, goods, or abstract units—move through constrained systems, and they connect directly to fundamental concepts like graph traversal, complexity analysis, linear programming, and matching theory. When you're tested on this material, you're really being assessed on your understanding of how different algorithmic strategies trade off between simplicity and efficiency, and how problem structure (bipartite graphs, unit capacities, multiple commodities) dictates which approach works best.

Don't just memorize algorithm names and their time complexities. Instead, focus on why each algorithm was developed—what limitation of previous methods it addresses, what structural insight it exploits, and what class of problems it handles most effectively. The real exam value comes from understanding when to apply each technique and how they relate to one another through shared concepts like augmenting paths, residual graphs, and flow conservation.


Augmenting Path Methods

These foundational algorithms share a common strategy: repeatedly find paths from source to sink that can carry additional flow, then push flow along those paths until no more augmenting paths exist. The key insight is that the residual graph—showing remaining capacity—guides the search for improvement.

Ford-Fulkerson Algorithm

  • Foundational maximum flow method—establishes the augmenting path framework that underlies most flow algorithms
  • Termination depends on path selection—works reliably with integer capacities but may fail to terminate with irrational values
  • Efficiency varies widely—time complexity depends entirely on how you find augmenting paths, making it more of a method than a complete algorithm

Edmonds-Karp Algorithm

  • BFS-based implementation of Ford-Fulkerson—using breadth-first search guarantees finding shortest augmenting paths first
  • Polynomial time complexity of O(VE2)O(VE^2)—the BFS strategy provides predictable, analyzable performance
  • Handles rational capacities—more robust than basic Ford-Fulkerson, making it suitable for a wider range of practical problems

Compare: Ford-Fulkerson vs. Edmonds-Karp—both use augmenting paths, but Edmonds-Karp's BFS guarantees polynomial time while Ford-Fulkerson's complexity depends on path selection. If asked about algorithm guarantees, Edmonds-Karp is your go-to example of how search strategy affects complexity.


Advanced Maximum Flow Techniques

These algorithms improve on basic augmenting path methods by exploiting graph structure more cleverly. They achieve better worst-case bounds through techniques like layered graphs, preflows, and capacity scaling.

Dinic's Algorithm

  • Level graph approach—constructs layers based on distance from source, then finds blocking flows within each layer
  • Time complexity of O(V2E)O(V^2E) for general graphs—improves to O(EV)O(E\sqrt{V}) for unit capacity networks
  • Excels on dense graphs—the layered structure provides significant speedup when many edges exist

Push-Relabel Algorithm

  • Preflow-based strategy—maintains excess flow at vertices rather than requiring valid flow throughout, offering more flexibility
  • O(V2E)O(V^2E) time complexity—uses local push and relabel operations instead of global path searches
  • Vertex-centric design—particularly effective for networks with high connectivity where path-based methods struggle

Capacity Scaling Algorithm

  • Scaling technique for large capacities—processes flow in phases based on capacity magnitude, from largest to smallest
  • Time complexity of O(ElogU)O(E \log U)—where UU is maximum capacity, making it efficient when capacities vary widely
  • Balances precision and speed—the scaling approach avoids getting stuck on tiny augmenting paths early in execution

Compare: Dinic's Algorithm vs. Push-Relabel—Dinic's uses global augmenting paths through level graphs while Push-Relabel works locally with preflows. Both achieve O(V2E)O(V^2E), but Push-Relabel often performs better in practice on dense graphs. Know both for questions about algorithmic paradigms.


Cost-Optimized Flow Problems

When minimizing cost matters as much as finding feasible flow, these algorithms combine flow techniques with shortest path methods. The objective shifts from maximum throughput to optimal efficiency.

Minimum Cost Flow Algorithm

  • Minimizes total cost while satisfying flow constraints—balances capacity limits with per-unit edge costs
  • Combines maximum flow and shortest path techniques—can use successive shortest paths or network simplex approaches
  • Critical for logistics applications—transportation, supply chain, and resource distribution problems where cost efficiency drives decisions

Network Simplex Algorithm

  • Simplex method adapted for network structure—exploits the special form of flow problems for computational efficiency
  • Solves minimum cost flow problems directly—handles large-scale networks that general linear programming would struggle with
  • Practical workhorse algorithm—widely used in operations research for real-world optimization problems

Compare: Minimum Cost Flow vs. Maximum Flow—maximum flow ignores edge costs entirely while minimum cost flow optimizes for cheapest feasible solution. FRQs may ask you to identify when cost considerations change the problem fundamentally.


Specialized Flow Problems

These problems extend the basic flow model to handle additional constraints like node demands, multiple commodities, or matching requirements. Understanding how standard flow techniques adapt to these variations is key.

Maximum Bipartite Matching

  • Largest matching in a bipartite graph—models assignment problems where items on one side pair with items on the other
  • Reducible to maximum flow—add source and sink nodes to transform matching into a flow problem
  • Hopcroft-Karp achieves O(VE)O(\sqrt{V} \cdot E)—specialized algorithm outperforms generic flow methods on this structure

Circulation with Demands

  • Flow with node-specific requirements—certain vertices must receive or send fixed amounts, not just source and sink
  • Extends maximum flow framework—solved by adding super-source and super-sink to handle demand constraints
  • Models supply chain networks—where warehouses, factories, and retailers have specific inflow/outflow needs

Multicommodity Flow Problem

  • Multiple flow types share network capacity—each commodity has its own source-sink pair but all compete for edge capacity
  • Requires linear programming or specialized methods—standard augmenting path approaches don't directly apply
  • Essential for telecommunications and transportation—routing different data streams or goods through shared infrastructure

Compare: Maximum Bipartite Matching vs. Circulation with Demands—matching is a special case where flow equals 0 or 1 on each edge, while circulation generalizes flow to handle arbitrary node demands. Both extend the basic model but in different directions.


Quick Reference Table

ConceptBest Examples
Augmenting path methodsFord-Fulkerson, Edmonds-Karp
Guaranteed polynomial timeEdmonds-Karp, Dinic's, Push-Relabel
Unit capacity optimizationDinic's Algorithm
Large capacity handlingCapacity Scaling Algorithm
Cost optimizationMinimum Cost Flow, Network Simplex
Bipartite structureMaximum Bipartite Matching
Node constraintsCirculation with Demands
Multiple flow typesMulticommodity Flow Problem

Self-Check Questions

  1. Which two algorithms both achieve O(V2E)O(V^2E) time complexity but use fundamentally different approaches—one path-based and one preflow-based?

  2. If you're working with a network where edge capacities range from 1 to 1,000,000, which algorithm's design specifically addresses this challenge, and what technique does it use?

  3. Compare and contrast how Maximum Bipartite Matching and Circulation with Demands each extend the basic maximum flow problem. What constraint does each add?

  4. Why does Edmonds-Karp guarantee polynomial time while basic Ford-Fulkerson does not, given that both use the same augmenting path framework?

  5. You need to route three different types of data packets through a shared network where each type has different source and destination nodes. Which problem formulation applies, and why can't you solve it with standard maximum flow techniques?