forall processors PID=0..p - 1 parbegin
Perform initial processor assignment to the leaves of
the progress tree
while there is still work left in the tree do
if subtree rooted at current node u is done then
move one level up
else if u is a leaf then
perform the work at the leaf
elseif u is an interior tree node then
Let ul and ur be the left and right children of u respectively
if the subtrees rooted at ul and ur are done then
update u
else if only one is done then
go to the one that is not done
else
move to ul or ur according to PID bit values
fifi od
parend.