Content deleted Content added
Line 75:
===Relabel===
When we ''relabel'' a node ''u'' we increase its height until it is 1 higher than its lowest neighbour in the residual graph. Conditions for a ''relabel'':
:{|
* <math>\mathrm{height}(u) \leq \mathrm{height}(v)</math> for all ''v'' such that <math>c(u,v)-f(u,v) > 0</math>. The only nodes we have available capacity to are higher.▼
| <math>u</math> is ''active'' ||
|-
▲
|}
So we have excess flow to push, but we not higher than any of our neighbours that have available capacity across their edge. Then we can execute '''Relabel''':
Function Relabel(u)
height(u) = min(height(v) where r(u,v) > 0) + 1;
===Push–relabel algorithm===
|