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 moreMatroid 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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesFinite State Machines (FSMs)Deterministic Finite Automata (DFA)Nondeterministic Finite Automata (NFA)Two-Way Finite AutomataNFA to DFA Conversion (Subset Construction)DFA Properties and Minimization AlgorithmsRegular Languages: Definition and CharacterizationContext-Free Grammars (CFGs)Pushdown Automata (PDA)Equivalence of CFGs and Pushdown AutomataClosure Properties of Context-Free LanguagesLimitations of Context-Free LanguagesPumping Lemma for Context-Free LanguagesTuring MachinesVariants of Turing Machines and EquivalenceNondeterministic Time Complexity and NPThe P vs. NP ProblemComplexity Class P: Polynomial TimeComplexity Class NP: Nondeterministic Polynomial TimeNP-Completeness and Cook-Levin TheoremLinear Programming AlgorithmsAdvanced Network Flow Algorithms

Longest path: 100 steps · 574 total prerequisite topics

Prerequisites (3)

Leads To (1)