Content deleted Content added
Line 125:
In the ''relabel-to-front algorithm'', the order of the ''push'' and ''relabel'' operations is given:
Function Relabel-to-Front(G(V,E),s,t):
for each edge (s,v):
push(s,v); //note that this will saturate the edge
L = v - {''s'',''t''}; //build a list of all vertices in any order
current = L.head;
while (current != NIL):
### Move ''u'' to the front of the list ''L''▼
old_height = height(u);
discharge(u);
if height(u) > old_height:
current = current.next;
The running time for ''relabel-to-front'' is <math>O(V^3)</math> (proof omitted). Again the bottleneck is non-saturating pushes, but we have reduced the number. Note that after step 1 there is no path from ''s'' to ''t'' in the residual graph.
|