Content deleted Content added
Added new Example subsection to the Generic Algorithm section |
Changed the markup language to "math" in the "Definitions and notations" section |
||
Line 16:
{{main|Flow network}}
Consider a flow network
:{|
| '''Capacity constraints''': || <math>\ f(u,v) \le c(u,v), \quad \forall u, v \in V</math>
|-
|-
| '''Flow conservation''': || <math>\ \sum_{v \in V} f(u,v) = 0, \quad \forall u \in V - \{s,t\}</math>
|}
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. This means that in a preflow the total flow into a vertex can exceed the flow out of the vertex. Put symbolically:
:{|
| '''Non-Negative constraint''': || <math>\ \sum\limits_{u \in V} f(u, v) \geq 0, \quad \forall v \in V - \{s\} </math>
|-
| '''Flow Excess''': || <math> e(v) =
\begin{cases}
\sum\limits_{u \in V} f(u, v), \quad \forall v \in V - \{s\} \\
\infty, \quad v = s
\end{cases} </math>
|}
For each
The push–relabel algorithm uses a nonnegative integer ''valid labeling'' function which makes use of ''distance labels'', or ''heights'',
:{|
|-
| '''Source condition''': || <math>h(s) = |V|</math>
|-
| '''Sink conservation''': || <math>h(t) = 0</math>
|}
An edge
===Operations===
|