In mathematical optimization, the push–relabel algorithm (alternatively, preflow–push algorithm) is an algorithm for computing maximum flows in a flow network. The name "push–relabel" comes from the two basic operations used in the algorithm. Throughout its execution, the algorithm maintains a "preflow" and gradually converts it into a maximum flow by moving flow locally between neighboring nodes using push operations under the guidance of an admissible network maintained by relabel operations. In comparison, the Ford–Fulkerson algorithm performs global augmentations that send flow following paths from the source all the way to the sink.

The push–relabel algorithm is considered one of the most efficient maximum flow algorithms. The generic algorithm has a strongly polynomial time complexity, which is asymptotically more efficient than the Edmonds–Karp algorithm. Specific variants of the algorithms achieve even lower time complexities. The variant based on the highest label node selection rule has time complexity and is generally regarded as the benchmark for maximum flow algorithms. Subcubic time complexity can be achieved using dynamic trees, although in practice it is less efficient.

Push–relabel maximum flow algorithm

The push–relabel 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.

Push–relabel maximum flow algorithm

History

The concept of a preflow was originally designed by Alexander V. Karzanov and was published in 1974 in Soviet Mathematical Dokladi 15. 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.

Push–relabel maximum flow algorithm

The push-relabel algorithm was designed by Andrew V. Goldberg and Robert Tarjan. The algorithm was initially presented in November 1986 in STOC '86: Proceedings of the eighteenth annual ACM symposium on Theory of computing, and then officially in October 1988 as an article in the Journal of the ACM. Both papers detail a generic form of the algorithm terminating in along with a sequential implementation, a implementation using dynamic trees, and parallel/distributed implementation. A explained in Goldberg-Tarjan introduced distance labels by incorporating them into the parallel maximum flow algorithm of Yossi Shiloach and Uzi Vishkin.

Concepts

Definitions and notations

Let: be a network with capacity function , a flow network, where and are chosen source and sink vertices respectively, denote a pre-flow in , denote the excess function with respect to the flow , defined by , denote the residual capacity function with respect to the flow , defined by , being the edges where , and denote the residual network of with respect to the flow .

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. This labeling function is denoted by . This function must satisfy the following conditions in order to be considered valid:

Valid labeling: for all Source condition:

Sink conservation:

In the algorithm, the label values of and are fixed. is a lower bound of the unweighted distance from to in if is reachable from . If has been disconnected from , then is a lower bound of the unweighted distance from to . As a result, if a valid labeling function exists, there are no paths in because no such paths can be longer than .

An arc is called admissible if . The admissible network is composed of the set of arcs that are admissible. The admissible network is acyclic.

For a fixed flow , a vertex is called active if it has positive excess with respect to , i.e., .

Operations

Initialization

The algorithm starts by creating a residual graph, initializing the preflow values to zero and performing a set of saturating push operations on residual arcs exiting the source, . Similarly, the labels are initialized such that the label at the source is the number of nodes in the graph, , and all other nodes are given a label of zero. Once the initialization is complete the algorithm repeatedly performs either the push or relabel operations against active nodes until no applicable operation can be performed.

Push

The push operation applies on an admissible out-arc of an active node in . It moves units of flow from to .

push(u, v): assert xf[u] > 0 and 𝓁[u] == 𝓁[v] + 1 Δ = min(xf[u], c[u][v] - f[u][v]) f[u][v] += Δ f[v][u] -= Δ xf[u] -= Δ xf[v] += Δ