<s>
In	O
mathematical	O
optimization	O
,	O
the	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
(	O
alternatively	O
,	O
preflow	O
–	O
push	O
algorithm	O
)	O
is	O
an	O
algorithm	O
for	O
computing	O
maximum	B-Algorithm
flows	I-Algorithm
in	O
a	O
flow	B-Algorithm
network	I-Algorithm
.	O
</s>
<s>
Throughout	O
its	O
execution	O
,	O
the	O
algorithm	O
maintains	O
a	O
"	O
preflow	O
"	O
and	O
gradually	O
converts	O
it	O
into	O
a	O
maximum	B-Algorithm
flow	I-Algorithm
by	O
moving	O
flow	O
locally	O
between	O
neighboring	O
nodes	O
using	O
push	O
operations	O
under	O
the	O
guidance	O
of	O
an	O
admissible	O
network	O
maintained	O
by	O
relabel	O
operations	O
.	O
</s>
<s>
In	O
comparison	O
,	O
the	O
Ford	B-Algorithm
–	I-Algorithm
Fulkerson	I-Algorithm
algorithm	I-Algorithm
performs	O
global	O
augmentations	O
that	O
send	O
flow	O
following	O
paths	O
from	O
the	O
source	O
all	O
the	O
way	O
to	O
the	O
sink	O
.	O
</s>
<s>
The	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
is	O
considered	O
one	O
of	O
the	O
most	O
efficient	O
maximum	B-Algorithm
flow	I-Algorithm
algorithms	O
.	O
</s>
<s>
The	O
generic	O
algorithm	O
has	O
a	O
strongly	O
polynomial	O
time	O
complexity	O
,	O
which	O
is	O
asymptotically	O
more	O
efficient	O
than	O
the	O
Edmonds	B-Algorithm
–	I-Algorithm
Karp	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
The	O
variant	O
based	O
on	O
the	O
highest	O
label	O
node	O
selection	O
rule	O
has	O
time	O
complexity	O
and	O
is	O
generally	O
regarded	O
as	O
the	O
benchmark	O
for	O
maximum	B-Algorithm
flow	I-Algorithm
algorithms	O
.	O
</s>
<s>
Subcubic	O
time	O
complexity	O
can	O
be	O
achieved	O
using	O
dynamic	B-Data_Structure
trees	I-Data_Structure
,	O
although	O
in	O
practice	O
it	O
is	O
less	O
efficient	O
.	O
</s>
<s>
The	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
has	O
been	O
extended	O
to	O
compute	O
minimum	B-Algorithm
cost	I-Algorithm
flows	I-Algorithm
.	O
</s>
<s>
The	O
idea	O
of	O
distance	O
labels	O
has	O
led	O
to	O
a	O
more	O
efficient	O
augmenting	O
path	O
algorithm	O
,	O
which	O
in	O
turn	O
can	O
be	O
incorporated	O
back	O
into	O
the	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
to	O
create	O
a	O
variant	O
with	O
even	O
higher	O
empirical	O
performance	O
.	O
</s>
<s>
The	O
push-relabel	B-Algorithm
algorithm	I-Algorithm
was	O
designed	O
by	O
Andrew	O
V	O
.	O
Goldberg	O
and	O
Robert	O
Tarjan	O
.	O
</s>
<s>
Both	O
papers	O
detail	O
a	O
generic	O
form	O
of	O
the	O
algorithm	O
terminating	O
in	O
along	O
with	O
a	O
sequential	O
implementation	O
,	O
a	O
implementation	O
using	O
dynamic	B-Data_Structure
trees	I-Data_Structure
,	O
and	O
parallel/distributed	O
implementation	O
.	O
</s>
<s>
A	O
explained	O
in	O
Goldberg-Tarjan	O
introduced	O
distance	O
labels	O
by	O
incorporating	O
them	O
into	O
the	O
parallel	O
maximum	B-Algorithm
flow	I-Algorithm
algorithm	O
of	O
Yossi	O
Shiloach	O
and	O
Uzi	O
Vishkin	O
.	O
</s>
<s>
a	O
flow	B-Algorithm
network	I-Algorithm
,	O
where	O
and	O
are	O
chosen	O
source	O
and	O
sink	O
vertices	O
respectively	O
,	O
</s>
<s>
The	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
uses	O
a	O
nonnegative	O
integer	O
valid	O
labeling	O
function	O
which	O
makes	O
use	O
of	O
distance	O
labels	O
,	O
or	O
heights	O
,	O
on	O
nodes	O
to	O
determine	O
which	O
arcs	O
should	O
be	O
selected	O
for	O
the	O
push	O
operation	O
.	O
</s>
<s>
The	O
generic	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
is	O
used	O
as	O
a	O
proof	O
of	O
concept	O
only	O
and	O
does	O
not	O
contain	O
implementation	O
details	O
on	O
how	O
to	O
select	O
an	O
active	O
node	O
for	O
the	O
push	O
and	O
relabel	O
operations	O
.	O
</s>
<s>
After	O
initialisation	O
,	O
the	O
algorithm	O
repeatedly	O
executes	O
an	O
applicable	O
push	O
or	O
relabel	O
operation	O
until	O
no	O
such	O
operations	O
apply	O
,	O
at	O
which	O
point	O
the	O
pre-flow	O
has	O
been	O
converted	O
into	O
a	O
maximum	B-Algorithm
flow	I-Algorithm
.	O
</s>
<s>
generic-push-relabel(G, c, s, t )	O
:	O
</s>
<s>
This	O
means	O
all	O
have	O
no	O
excess	O
flow	O
,	O
and	O
with	O
no	O
excess	O
the	O
preflow	O
obeys	O
the	O
flow	B-Algorithm
conservation	I-Algorithm
constraint	O
and	O
can	O
be	O
considered	O
a	O
normal	O
flow	O
.	O
</s>
<s>
This	O
flow	O
is	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
according	O
to	O
the	O
max-flow	B-Algorithm
min-cut	I-Algorithm
theorem	I-Algorithm
since	O
there	O
is	O
no	O
augmenting	O
path	O
from	O
to	O
.	O
</s>
<s>
Therefore	O
,	O
the	O
algorithm	O
will	O
return	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
upon	O
termination	O
.	O
</s>
<s>
Bounding	O
the	O
number	O
of	O
nonsaturating	O
pushes	O
can	O
be	O
achieved	O
via	O
a	O
potential	B-General_Concept
argument	I-General_Concept
.	O
</s>
<s>
The	O
following	O
is	O
a	O
sample	O
execution	O
of	O
the	O
generic	O
push-relabel	B-Algorithm
algorithm	I-Algorithm
,	O
as	O
defined	O
above	O
,	O
on	O
the	O
following	O
simple	O
network	B-Algorithm
flow	I-Algorithm
graph	O
diagram	O
.	O
</s>
<s>
The	O
algorithm	O
terminates	O
and	O
returns	O
the	O
maximum	B-Algorithm
flow	I-Algorithm
of	O
the	O
graph	O
(	O
as	O
seen	O
above	O
)	O
.	O
</s>
<s>
While	O
the	O
generic	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
has	O
time	O
complexity	O
,	O
efficient	O
implementations	O
achieve	O
or	O
lower	O
time	O
complexity	O
by	O
enforcing	O
appropriate	O
rules	O
in	O
selecting	O
applicable	O
push	O
and	O
relabel	O
operations	O
.	O
</s>
<s>
The	O
"	O
current-arc	O
"	O
data	O
structure	O
is	O
a	O
mechanism	O
for	O
visiting	O
the	O
in	O
-	O
and	O
out-neighbors	O
of	O
a	O
node	O
in	O
the	O
flow	B-Algorithm
network	I-Algorithm
in	O
a	O
static	O
circular	O
order	O
.	O
</s>
<s>
Finding	O
the	O
next	O
admissible	O
edge	O
to	O
push	O
on	O
has	O
amortized	B-General_Concept
complexity	I-General_Concept
.	O
</s>
<s>
Definition	O
of	O
the	O
discharge	O
operation	O
reduces	O
the	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
to	O
repeatedly	O
selecting	O
an	O
active	O
node	O
to	O
discharge	O
.	O
</s>
<s>
The	O
FIFO	B-Operating_System
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
organizes	O
the	O
active	O
nodes	O
into	O
a	O
queue	O
.	O
</s>
<s>
The	O
relabel-to-front	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
organizes	O
all	O
nodes	O
into	O
a	O
linked	O
list	O
and	O
maintains	O
the	O
invariant	O
that	O
the	O
list	O
is	O
topologically	B-Algorithm
sorted	I-Algorithm
with	O
respect	O
to	O
the	O
admissible	O
network	O
.	O
</s>
<s>
The	O
highest-label	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
organizes	O
all	O
nodes	O
into	O
buckets	O
indexed	O
by	O
their	O
labels	O
.	O
</s>
<s>
Although	O
in	O
the	O
description	O
of	O
the	O
generic	O
push	B-Algorithm
–	I-Algorithm
relabel	I-Algorithm
algorithm	I-Algorithm
above	O
,	O
is	O
set	O
to	O
zero	O
for	O
each	O
node	O
u	O
other	O
than	O
and	O
at	O
the	O
beginning	O
,	O
it	O
is	O
preferable	O
to	O
perform	O
a	O
backward	O
breadth-first	B-Algorithm
search	I-Algorithm
from	O
to	O
compute	O
exact	O
labels	O
.	O
</s>
<s>
Phase	O
two	O
converts	O
the	O
maximum	O
preflow	O
into	O
a	O
maximum	B-Algorithm
flow	I-Algorithm
by	O
returning	O
excess	O
flow	O
that	O
cannot	O
reach	O
to	O
.	O
</s>
<s>
The	O
global	O
relabeling	O
heuristic	O
periodically	O
performs	O
backward	O
breadth-first	B-Algorithm
search	I-Algorithm
from	O
in	O
to	O
compute	O
the	O
exact	O
labels	O
of	O
the	O
nodes	O
.	O
</s>
<s>
Both	O
heuristics	O
skip	O
unhelpful	O
relabel	O
operations	O
,	O
which	O
are	O
a	O
bottleneck	O
of	O
the	O
algorithm	O
and	O
contribute	O
to	O
the	O
ineffectiveness	O
of	O
dynamic	B-Data_Structure
trees	I-Data_Structure
.	O
</s>
