Multiple-Source Multiple-Sink Maximum Flow in Directed Planar Graphs in Near-Linear Time
We give an O(n log^3 n) algorithm that, given an n-node directed planar graph with arc capacities, a set of source nodes, and a set of sink nodes, finds a maximum flow from the sources to the sinks. Previously, the fastest algorithms known for this problem were those for general graphs.
š” Research Summary
The paper addresses the classic maximumāflow problem in directed planar graphs when there are multiple sources and multiple sinks. While singleāsource singleāsink planar maxāflow has been studied for decades and can be solved in nearālinear time, the multiāsource multiāsink variant remained open: the only known approaches reduced the problem to a singleāsource singleāsink instance by adding a superāsource and a superāsink, which destroys planarity and leads to algorithms with O(n²āÆlogāÆn) or O(n¹·āµāÆlogāÆnāÆlogāÆU) running times.
The authors present the first planarāspecific algorithm that solves the problem in O(nāÆlog³āÆn) time, where n is the number of vertices. This matches the best known bounds for singleāsource singleāsink planar flow up to a polylogarithmic factor and dramatically improves over the generalāgraph reductions. The main theorem states: Given an nāvertex directed planar graph with arc capacities, a set S of source vertices, and a set T of sink vertices, a maximum feasible flow from S to T can be computed in O(nāÆlog³āÆn) time.
Algorithmic framework
The algorithm follows a recursive divideāandāconquer scheme based on a simple cycle separator C of size O(ān). The separator is obtained using the MillerāTamassiaāVishkin cycleāseparator theorem. All edges of C except one are contracted, turning the whole cycle into a selfāloop attached to a single āsuperānodeā v. The graph is thereby split into two subgraphs: the interior Gā and the exterior Gā of the loop.
Each recursive call solves a slightly more general problem: besides the original sources S and sinks T, a constantāsize set A (|A| ⤠6) of auxiliary vertices is also treated as sources and sinks. This allows the separator vertices to act as temporary terminals without blowing up the recursion depth. The recursion proceeds until the subgraphs become small enough that a direct planar maxāflow routine can be applied.
After the two recursive calls return pseudoāflows (flows that respect capacities but may violate conservation at the separator vertices), the algorithm āuncontractsā the separator and performs three postāprocessing phases:
-
FixConservationOnPath ā The separator C is viewed as a path P (C minus one edge). Using a specialized Dijkstra implementation due to Fakcharoenphol and Rao, the algorithm pushes flow along P so that no vertex on P with positive excess can reach any vertex with negative excess via a residual path. This eliminates residual sourceātoāseparator and separatorātoāsink paths while preserving the overall flow value.
-
CycleToSingleSinkLimitedMaxFlow / SingleSourceToCycleLimitedMaxFlow ā For each auxiliary vertex aįµ¢ ā A, the algorithm first pushes as much excess from the positiveāexcess part of C to aįµ¢, then pushes as much deficit from aįµ¢ back to the negativeāexcess part of C. These subroutines are limitedācapacity maxāflow computations that respect the current pseudoāflow and use the same denseādistanceāgraph Dijkstra machinery. Because |A| is constant, the total cost of these steps is O(nāÆlog²āÆn).
-
Final redistribution ā Any remaining excess on C is sent back to the original sources S, and any remaining deficit is supplied from the original sinks T. At this point there is no residual path from any source to any sink in the whole graph.
The resulting pseudoāflow is then converted into a feasible maximum flow in linear time by first canceling flow cycles (using the technique of Kaplan and Nussbaum) and then sending the remaining excess/deficit along a topological order.
Key technical ingredients
-
Pseudoāflow representation ā The algorithm never stores the full flow on every arc; it only tracks excess at a small set of vertices and maintains a compact representation of the residual capacities. This dramatically reduces the amount of work per recursion level.
-
Dualāprimal relationship ā By exploiting the correspondence between circulations in the primal graph and shortest paths in the dual, the algorithm can update flows implicitly via shortestāpath queries.
-
Monge matrix range queries ā The vertices on the separator are cyclically ordered, which gives the distance matrix a Monge property. A data structure for range minimum queries in Monge matrices enables O(logāÆn) updates of the āpotentialā values used in the limited maxāflow subroutines.
-
FakcharoenpholāRao denseādistance Dijkstra ā The algorithm repeatedly needs shortestāpath distances in subgraphs induced by the separator. The denseādistanceāgraph technique precomputes distances between boundary vertices and answers queries in nearālinear time, which is essential for achieving the O(nāÆlog³āÆn) bound.
-
Cycle separator with weighted vertices ā To keep the auxiliary set A small, the algorithm alternates between uniform vertex weights and weights concentrated on A when selecting the separator, a trick borrowed from previous planar flow work.
Complexity analysis
Each recursion level processes O(n) vertices, and the dominant operations (FixConservationOnPath and the two limitedāflow subroutines) each run in O(nāÆlog²āÆn / logāÆlogāÆn + |C|²āÆlog²āÆn) time. Since |C| = O(ān), the term |C|²āÆlog²āÆn = O(nāÆlog²āÆn). Thus a single level costs O(nāÆlog²āÆn). The recursion depth is O(logāÆn) because the separator halves the number of vertices each time. Multiplying yields the overall O(nāÆlog³āÆn) running time. The space usage is linear in n, dominated by the planar embedding, the denseādistance structures, and the pseudoāflow bookkeeping.
Applications
The authors highlight two important domains:
-
Computer vision ā Many energy minimization problems (image restoration, segmentation, stereo, motion) can be expressed as a multiāsource multiāsink minācut on a planar pixel grid. Since the underlying graph is planar, the new algorithm provides a theoretical nearālinearātime solution, improving over the O(nāÆlogāÆn) or O(nāÆlog³ā²āÆn) heuristics previously used.
-
Planar bipartite matching ā Maximum bipartite matching in a planar graph reduces to a multiāsource multiāsink flow problem. The presented algorithm therefore yields the first nearālinearātime planarāspecific matching algorithm.
Conclusion
The paper delivers a sophisticated blend of classic planarāgraph techniques (cycle separators, duality) with modern data structures (denseādistance Dijkstra, Monge range queries) to solve a longāstanding open problem. By keeping the number of āboundaryā vertices constant and handling excess/deficit via pseudoāflows, the authors avoid the quadratic blowāup that plagued earlier reductions. The result is an O(nāÆlog³āÆn) algorithm that is both theoretically optimal up to polylogarithmic factors and practically relevant for vision and matching tasks on planar networks.
Comments & Academic Discussion
Loading comments...
Leave a Comment