Complexity Theory Codexery

Push–relabel maximum flow algorithm

Efficient maximum flow algorithm using push and relabel operations.

Push–relabel maximum flow algorithm

The push–relabel algorithm, also called the preflow–push algorithm, solves the maximum flow problem. It works by keeping a preflow—where flow into a node can exceed flow out—and gradually turning it into a maximum flow. This is done through two main operations: pushing flow locally between neighboring nodes, and relabeling nodes to maintain an admissible network that guides the pushes. Unlike the Ford–Fulkerson algorithm, which sends flow along entire source-to-sink paths, push–relabel works locally.

This algorithm is regarded as one of the most efficient for maximum flow. The generic version has a strongly polynomial time complexity of O(V²E), which is asymptotically better than the O(VE²) of the Edmonds–Karp algorithm. Some variants achieve even lower complexities. The highest-label variant runs in O(V²√E) and is often considered the benchmark for maximum flow algorithms. Using dynamic trees, subcubic O(VE log(V²/E)) complexity is possible, though this is less efficient in practice.

The push–relabel approach has also been extended to compute minimum cost flows. The distance labels it introduced led to a more efficient augmenting path algorithm, which can then be incorporated back into push–relabel to create a variant with better empirical performance.

The concept of a preflow, which allows flow to accumulate at nodes, was first proposed by Alexander V. Karzanov in 1974. His algorithm also used a push operation but relied on distances in an auxiliary network rather than a labeling system.

The push–relabel algorithm itself was designed by Andrew V. Goldberg and Robert Tarjan. It was first presented in November 1986 at STOC '86 and later published in the Journal of the ACM in October 1988. Both papers describe a generic form that terminates in O(V²E), along with a sequential O(V³) implementation, an O(VE log(V²/E)) version using dynamic trees, and parallel or distributed implementations. Goldberg and Tarjan introduced distance labels by adapting them from the parallel maximum flow algorithm of Yossi Shiloach and Uzi Vishkin.

The algorithm uses a valid labeling function that assigns nonnegative integer heights to nodes. This labeling must satisfy: for every residual arc (u, v), the height of u is at most the height of v plus one; the source has height equal to the number of nodes; and the sink has height zero. These labels give a lower bound on the unweighted distance from a node to the sink in the residual network, or to the source if the sink is unreachable. If a valid labeling exists, no source-to-sink path can exist in the residual network. An arc is called admissible if the height of u equals the height of v plus one. The set of admissible arcs forms an acyclic network. A node other than the source or sink is active if it has positive excess flow.

The algorithm begins by initializing the residual graph, setting all preflow values to zero, and saturating all arcs leaving the source. The source is labeled with the total number of nodes, and all other nodes are labeled zero. Then it repeatedly applies push or relabel operations to active nodes until none remain.

A push operation moves flow from an active node u along an admissible outgoing residual arc (u, v). The amount moved is the smaller of u’s excess and the arc’s residual capacity. A saturating push uses up the entire residual capacity; a non-saturating push clears all excess from u.

A relabel operation applies to an active node (not the source or sink) that has no admissible outgoing arcs. It increases the node’s label to the smallest value that creates at least one admissible outgoing arc, ensuring no steep arcs (where residual capacity exists and the label difference is greater than one) are created.

field
Mathematical optimization
known_for
Maximum flow algorithm with strongly polynomial O(V²E) time complexity

Lore & Background

The push–relabel algorithm was designed by Andrew V. Goldberg and Robert Tarjan. Both papers detail a generic form of the algorithm terminating in O(V²E) along with a O(V³) sequential implementation, a O(VE log(V²/E)) implementation using dynamic trees, and parallel/distributed implementation. Goldberg–Tarjan introduced distance labels by incorporating them into the parallel maximum flow algorithm of Yossi Shiloach and Uzi Vishkin. The idea of a preflow was originally conceived by Alexander V. This pre-flow algorithm also used a push operation; however, it used distances in the auxiliary network to determine where to push the flow instead of a labeling system. The push–relabel algorithm uses a nonnegative integer valid labeling function which makes use of distance labels, or heights, on nodes to determine which arcs should be selected for the push operation.

Reader's Guide

The push–relabel algorithm is significant as one of the most efficient maximum flow algorithms. The generic algorithm has a strongly polynomial O(V²E) time complexity, which is asymptotically more efficient than the O(VE²) Edmonds–Karp algorithm. Specific variants achieve even lower time complexities: the variant based on the highest label node selection rule has O(V²√E) time complexity and is generally regarded as the benchmark for maximum flow algorithms. Subcubic O(VE log(V²/E)) time complexity can be achieved using dynamic trees, although in practice it is less efficient. The algorithm has been extended to compute minimum cost flows. The idea of distance labels has led to a more efficient augmenting path algorithm, which in turn can be incorporated back into the push–relabel algorithm to create a variant with even higher empirical performance.

Did You Know?

Frequently Asked Questions

Who is Push–relabel maximum flow algorithm?

It is a method for finding the maximum flow through a directed flow network, also called the preflow–push algorithm. Rather than tracing augmenting paths from source to sink, it works by shuffling flow locally between adjacent vertices until a valid maximum flow emerges.

What are Push–relabel maximum flow algorithm's powers/role?

It repeatedly applies two local moves: a push operation that slides excess flow along an admissible edge to a neighbor, and a relabel operation that raises a vertex's height label when no admissible outgoing edge remains. This height-guided, node-by-node strategy is what distinguishes it from path-based flow methods.

How does Push–relabel maximum flow algorithm's story end?

The process stops the moment every node except the source and sink has zero excess flow, meaning the preflow has been fully converted into a legitimate flow. At that point the flow is provably maximum, and no further pushes or relabels are possible.

Why is Push–relabel maximum flow algorithm important?

It is widely regarded as one of the fastest practical maximum-flow methods, with a strongly polynomial O(V²E) worst-case bound. Its elegant reliance on purely local operations makes it both theoretically clean and highly competitive in real-world optimization workloads.

What is Push–relabel maximum flow algorithm's time complexity?

The algorithm is guaranteed to finish in O(V²E) time, where V is the number of vertices and E the number of edges. This strongly polynomial bound holds no matter which valid selection heuristic is used to pick the next active node.

More in Complexity Theory 1-24

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →