Given a sequence of n elements, the All Nearest Smaller Values (ANSV) problem is to nd, for each element in the sequence, the nearest element to the left (right) that is smaller, or to report that no such element exists. Time and work optimal algorithms for this problem are known on all the PRAM models 3], 5], but the running time of the best previous hypercube algorithm 6] is optimal only when the number of processors p satis es 1 p n=((lg 3 n)(lg lg n) 2). In this paper, we prove that any normal hypercube algorithm requires (n) processors to solve the ANSV problem in O(lg n) time, and we present the rst normal hypercube ANSV algorithm that is optimal for all values of n and p. We use our ANSV algorithm to give the rst O(lg n)-time n-processor normal hypercube algorithms for triangulating a monotone polygon and for constructing a Cartesian tree.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.