CS255
Chris Pollett
Feb 21, 2018
We now work towards a ZNC algorithm for sorting which run in `O(log n)` time doing a total of `O(n log n)` operations on all processors (Reischuk 1985). Let `P_i` denote the `i`th processor.
We begin by considering a PRAM variant of Quicksort:
Notice this algorithm uses randomness, but it has zero error -- we can detect if we are in a bad case in which case we rerun -- it is in this sense it is a ZNC algorithm for sorting.
Suppose we want to sort the items {3, -1, 5, 6, 2} and have 5 processors. Show the computation steps involved for each processor for each step in the QuickSort algorithm.
Post your solutions to the Feb 21 In-Class Exercise Thread.
Suppose we have `n` processors and `n` elements. Suppose the first `r` processors have values in sorted order.