Content deleted Content added
temporary section merge for further editing |
→Concepts: reduce verbosity |
||
Line 5:
The push-relabel algorithm has been extended to compute [[minimum cost flow]]s.<ref name="goldberg97"/> The idea of distance labels has led to an 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.<ref name="goldberg08"/><ref name="ahuja91"/>
==
===Definitions and notations===
Consider a flow network {{nowrap|''G''(''V'', ''E'')}} with a pair of distinct vertices ''s'' and ''t'' designated as the source and the sink, respectively. For each edge {{nowrap|(''u'', ''v'') ∈ ''E''}}, {{nowrap|''c''(''u'', ''v'') ≥ 0}} denotes its capacity; if {{nowrap|(''u'', ''v'') ∉ ''E''}}, we assume that {{nowrap|''c''(''u'', ''v'') {{=}} 0}}. A flow on ''G'' is a function {{nowrap|''f'': ''V'' × ''V'' → '''R'''}} satisfying the following conditions:
:;Capacity constraints
::{{nowrap|''f''(''u'', ''v'') ≤ ''c''(''u'', ''v'') ∀''u'', ''v'' ∈ ''V''}}
:;Skew symmetry
::{{nowrap|''f''(''u'', ''v'') {{=}} −''f''(''v'', ''u'') ∀''u'', ''v'' ∈ ''V''}}
:;Flow conservation
::{{nowrap|∑<sub>''v'' ∈ ''V''</sub> ''f''(''v'', ''u'') {{=}} 0 ∀''u'' ∈ ''V'' \ {''s'', ''t''}}}
The push-relabel algorithm introduces the concept of ''preflows''. A preflow is a function with a definition almost identical to that of a flow except that it relaxes the flow conservation condition. Instead of requiring strict flow balance at vertices other than ''s'' and ''t'', it allows them to carry positive excesses. Put symbolically:
:;Nonnegative excesses:
▲{{seealso|Flow network}}
::{{nowrap|''e''(''u'') {{=}} ∑<sub>''v'' ∈ ''V''</sub> ''f''(''v'', ''u'') ≥ 0 ∀''u'' ∈ ''V'' \ {''s''}}}
{{nowrap|''e''(''s'')}} is assumed to be infinite. A vertex ''u'' is called ''active'' if {{nowrap|''e''(''u'') > 0}}.
For each {{nowrap|(''u'', ''v'') ∈ ''V'' × ''V''}}, denote its ''residual capacity'' by {{nowrap|''c<sub>f</sub>''(''u'', ''v'') {{=}} ''c''(''u'', ''v'') − ''f''(''u'', ''v'')}}. The residual network of ''G'' with respect to a preflow ''f'' is defined as {{nowrap|''G<sub>f</sub>''(''V'', ''E<sub>f</sub>'')}} where {{nowrap|''E<sub>f</sub>'' {{=}} {(''u'', ''v'') {{!}} ''u'', ''v'' ∈ ''V'' ∧ ''c<sub>f</sub>''(''u'', ''v'') > 0}}}. If there is no path from any active vertex to ''t'' in {{nowrap|''G<sub>f</sub>''}}, the preflow is called ''maximum''. In a maximum preflow, the excess of ''t'' is equal to the value of a maximum flow; if ''T'' is the set of vertices from which ''t'' is reachable in {{nowrap|''G<sub>f</sub>''}}, and {{nowrap|''S'' {{=}} ''V'' \ ''T''}}, then {{nowrap|(''S'', ''T'')}} is a [[Max-flow min-cut theorem|minimum s-t cut]].
The push-relabel algorithm makes use of distance labels, or ''heights'', of the vertices denoted by {{nowrap|''h''(''u'')}}. For each vertex {{nowrap|''u'' ∈ ''V'' \ {''s'', ''t''}}}, {{nowrap|''h''(''u'')}} is a nonnegative integer satisfying
:;Valid labeling
::{{nowrap|''h''(''u'') ≤ ''h''(''v'') + 1 ∀(''u'', ''v'') ∈ ''E<sub>f</sub>''}}
The heights of ''s'' and ''t'' are fixed at {{nowrap|{{!}}''V''{{!}}}} and 0, respectively.
The height of a vertex is a lower bound of its unweighted distance in the residual network to ''t'' or to ''s'' if it has been separated from ''t''. An edge {{nowrap|(''u'', ''v'') ∈ ''E<sub>f</sub>''}} is called ''admissible'' if {{nowrap|''h''(''u'') {{=}} ''h''(''v'') + 1}}. The network {{nowrap|''G̃<sub>f</sub>''(''V'', ''Ẽ<sub>f</sub>'')}} where {{nowrap|''Ẽ<sub>f</sub>'' {{=}} {(''u'', ''v'') {{!}} (''u'', ''v'') ∈ ''E<sub>f</sub>'' ∧ ''h''(''u'') {{=}} ''h''(''v'') + 1}}} is called the ''admissible network''. The admissible network is acyclic.
===Operations===
====Push====
The push operation applies on an admissible out-edge {{nowrap|(''u'', ''v'')}} an active vertex ''u'' in {{nowrap|''G<sub>f</sub>''}}. It moves {{nowrap|min{''e''(''u''), ''c<sub>f</sub>''(''u'', ''v'')}}} units of flow from ''u'' to ''v''.
push(u, v):
assert e[u] > 0 and h[u] == h[v] + 1
Δ = min(e[u], c[u][v] - f[u][v])
f[u][v] += Δ
f[v][u] -= Δ
e[u] -= Δ
e[v] += Δ
A push operation that causes {{nowrap|''f''(''u'', ''v'')}} to reach {{nowrap|''c''(''u'', ''v'')}} is called a ''saturating'' push; otherwise, it is called an ''unsaturating'' push. After an unsaturating push, {{nowrap|''e''(''u'') {{=}} 0}}.
====Relabel====
The relabel operation applies on an active vertex ''u'' without any admissible out-edges in {{nowrap|''G<sub>f</sub>''}}. It modifies {{nowrap|''h''(''u'')}} to the minimum value such that an admissible out-edge is created. Note that this always increases {{nowrap|''h''(''u'')}}.
relabel(u):
assert e[u] > 0 and h[u] <= h[v] ∀v such that f[u][v] < c[u][v]
h[u] = min(h[v] ∀v such that f[u][v] < c[u][v]) + 1
==Push-relabel Algorithm==
|