Abstract

We consider the problem of computing the minimum of n values, and several well-known generalizations (prefix minima, range minima, and all-nearest-smaller-values (ANSV) problems) for input elements drawn from the integer domain [1., s] where s≥n. Recent work [4] has shown that parallel algorithms that are sensitive to the size of the input domain can improve on more general parallel algorithms. The cited paper demonstrates an O(log log log s)-step algorithm on an n-processorPriority CRCW PRAM for finding the prefix-minima of n numbers in the range [1., s]. The best known upper bounds for the range minima and ANSV problems were previously O(log log n) (using algorithms for general input). This was also the best known upper bound for computing prefix minima or even just the minimum on the common CRCW PRAM; this model has a Θ(log n/ log log n) time separation from the stronger Priority model when using the same number of processors. In this paper we give simple and efficient algorithms for all of the above problems. These algorithms all take O(log log log s) time using an optimal number of processors and O(ns)∈ space on the Common CRCW PRAM. We also prove a lower bound demonstrating that no algorithm is asymptotically faster as a function of s, by showing that for \(s = 2^{2^{\Omega (log n log log n)} }\) the upper bounds are tight.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call