A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Advanced Network Flow Algorithms

Research Depth 99 in the knowledge graph ☐ I know this ☆ Set as goal
2topics build on this
574prerequisites beneath it
See this on the map →
Linear Programming AlgorithmsMaximum Flow: Network Flow Problems and Algorithms+1 more→→Matroid Intersection
network-flow max-flow-min-cut push-relabel min-cost-flow

Core Idea

Network flow algorithms extend beyond basic Ford-Fulkerson to achieve faster runtimes and solve richer problems. The push-relabel algorithm (Goldberg-Tarjan) achieves O(V2 * E) time for max-flow by maintaining a preflow (allowing excess at vertices) and using height labels to guide flow toward the sink — avoiding the repeated BFS of augmenting-path methods. Dinic's algorithm achieves O(V2 * E) using blocking flows in layered graphs, with O(E * sqrt(V)) for unit-capacity networks. Minimum-cost flow generalizes max-flow by adding edge costs and finding the cheapest way to route a given flow value, solvable via successive shortest paths or cost-scaling in O(V * E * log V * log(VC)). These algorithms reduce to LP but exploit network structure for dramatically faster specialized solutions. Applications span bipartite matching, project selection, image segmentation, and airline scheduling.

Explainer

You already understand the Ford-Fulkerson framework: find augmenting paths from source to sink, push flow along them, repeat until no augmenting path exists. The advanced algorithms you encounter here improve the runtime by orders of magnitude through deeper structural insights — preflow techniques, layered graph decompositions, and potential function arguments.

Dinic's algorithm introduces the concept of blocking flows on layered graphs. First, BFS from the source constructs a layered graph where each edge goes from layer i to layer i+1 (these are the shortest-path layers). A blocking flow saturates at least one edge on every source-to-sink path in this layered graph, and can be found in O(VE) time. After each blocking flow, the shortest augmenting path length increases by at least 1, so at most V-1 phases suffice. The total work is O(V2 E). On unit-capacity networks, each phase costs only O(E) and the argument about path lengths after sqrt(V) phases reduces the total to O(E sqrt(V)) — this is the Hopcroft-Karp algorithm for bipartite matching.

The push-relabel algorithm (Goldberg and Tarjan, 1988) takes a radically different approach. Instead of finding global augmenting paths, it maintains a preflow — flow that may violate conservation by having excess at non-source/sink vertices — and works locally. Each vertex has a height label; flow is pushed "downhill" (from higher to lower labels). When a vertex has excess but no downhill neighbors, its label is raised (relabeled). The key insight is that the height labels form a valid distance estimate to the sink in the residual graph, so the algorithm implicitly routes excess flow toward the sink. The amortized analysis bounds the total work at O(V2 E), with practical implementations using FIFO or highest-label selection achieving much better empirical performance.

Minimum-cost flow extends the framework by assigning costs to edges and finding the cheapest flow of a given value. The successive shortest paths algorithm repeatedly finds shortest (minimum cost) augmenting paths using Bellman-Ford or Dijkstra with Johnson's reweighting. Cost-scaling algorithms achieve O(V E log V log(VC)) by iteratively refining approximate complementary slackness conditions. Applications include transportation problems, assignment problems, and any optimization where both capacity and cost constraints matter. The LP dual of minimum-cost flow yields the economic interpretation: dual variables are node potentials (prices), and complementary slackness means flow only uses edges where the reduced cost (cost minus potential difference) is optimal.

Practice Questions 4 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Two-Way Finite Automata → NFA to DFA Conversion (Subset Construction) → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Pushdown Automata (PDA) → Equivalence of CFGs and Pushdown Automata → Closure Properties of Context-Free Languages → Limitations of Context-Free Languages → Pumping Lemma for Context-Free Languages → Turing Machines → Variants of Turing Machines and Equivalence → Nondeterministic Time Complexity and NP → The P vs. NP Problem → Complexity Class P: Polynomial Time → Complexity Class NP: Nondeterministic Polynomial Time → NP-Completeness and Cook-Levin Theorem → Linear Programming Algorithms → Advanced Network Flow Algorithms

Longest path: 100 steps · 574 total prerequisite topics

Prerequisites (3)

Leads To (1)