Goldberg-Tarjan algorithm

from Wikipedia, the free encyclopedia

The Goldberg-Tarjan algorithm , also known as the push-relabel algorithm , is an algorithm from graph theory for calculating a maximum flow in a network . It was developed by Andrew Goldberg and Robert Endre Tarjan and published in 1988.

The algorithm

In the following, the directional graph in the network , the capacity function ( indicating the capacity of an edge ), the node from which the flow starts, and the destination node of the flow. denotes the set of nodes of the graph , the set of edges and the set of edges that leave the node .

The algorithm calculates a maximum st-flow by modifying a flow until it is an st-flow. If this occurs, the obtained st-flow is also maximal. The algorithm also works with a distance marker, i. H. with a function with , and for all edges . An edge of the residual graph is called allowed if it satisfies.

The algorithm works as follows:

  1. Set for all edges : and for all other edges : .
  2. Set and for all other nodes : .
  3. As long as there is an active node (i.e. a node with more flow arriving than flowing away), choose such a node and do:
    If no allowed edge leaves the node in the residual graph , set
    Otherwise augment along an allowed edge that leaves (i.e. if is, set ; otherwise is , and thus the rear edge of an edge , then set . Here, the residual capacities and the excess at the node denote the difference between the incoming and outgoing flow. ).

A modification of the flow in step 3 is also called “push”, a modification of the distance marking “relabel”. Hence the name Push Relabel Algorithm.

At the end there is a maximum st flow. Because at any point in time the node is the only source and the algorithm does not stop until the node is the only sink. Since a distance marking always remains and thus fulfills the properties described above, it is ensured that the node in the residual graph can never be reached from the source . This ensures that the st-flow calculated by the algorithm is actually a maximum st-flow.

running time

As general as stated above, the algorithm has a running time of .

If you always select an active node in step 3 of the algorithm , for which the distance marker has the maximum value among all active nodes (i.e. one with ), a running time of can be proven. In the implementation, however, this requires that for each value of up each a list of all active nodes to run (ie for each value that can take in theory), must also the respective current maximum of be tracked on the set of active nodes. This is necessary so that an active node with a maximum without loss of runtime can be selected in each run of the loop .

With more sophisticated implementations, runtimes of

and

to reach. Here denotes the maximum value of the capacity function .

swell

Individual evidence

  1. ^ Andrew Goldberg, Robert Tarjan: A new approach to the maximum flow problem . In: Journal of the ACM . tape 35 , 1988, pp. 921-940 .
  2. ^ Bernhard Korten, Jens Vygen: Combinatorial Optimization . 3. Edition. 2006, p. 168 .