Set := + R(P(i)) R(P(i)) R(i) Set := S(P(i)) S(i) Set := P(S(i)) P(i) The predecessor and successor pointers are updated The ranks of nodes which are immediately before a removed node are updated. The array and can be compacted in work and time after each phase of removal of nodes. This is done P S O(n) O(log n) through a parallel prefix computation. Recall that we have to do the removal of nodes for loglog phases to reduce the number of nodes to . logn n n We can keep a separate array for each phase. U Putting back a node A removed node can be reinserted in time O(1) Complexity 2-coloring in each stage can be done in O(log n) time and O(n) work. The compaction of the P and S arrays is done through a parallel prefix computation in O(log n) time and O(n) work. There are in all O(log log n) stages in which we have to remove nodes. Each stage takes O(log n) time due to the 2-coloring and parallel prefix computations. At the end, we do one list ranking for a list of size O(n/log n). This takes O(n) work and O(log n) time.
Set R(P(i)) := R(P(i)) + R(i) Set S(P(i)) := S(i) Set P(S(i)) := P(i) The predecessor and successor pointers are updated The ranks of nodes which are immediately before a removed node are updated. The array P and S can be compacted in O(n) work and O(log n) time after each phase of removal of nodes. This is done through a parallel prefix computation. Recall that we have to do the removal of nodes for loglog n phases to reduce the number of nodes to n . logn We can keep a separate U array for each phase. Putting back a node A removed node can be reinserted in O(1) time Complexity 2-coloring in each stage can be done in O(log n) time and O(n) work. The compaction of the P and S arrays is done through a parallel prefix computation in O(log n) time and O(n) work. There are in all O(log log n) stages in which we have to remove nodes. Each stage takes O(log n) time due to the 2-coloring and parallel prefix computations. At the end, we do one list ranking for a list of size O(n/log n). This takes O(n) work and O(log n) time.