All Nearest Smaller Values on the Hypercube

  • Authors:
  • Dina Kravets;C. Greg Plaxton

  • Affiliations:
  • -;-

  • Venue:
  • IEEE Transactions on Parallel and Distributed Systems
  • Year:
  • 1996

Quantified Score

Hi-index 0.01

Visualization

Abstract

Given a sequence of n elements, the All Nearest Smaller Values (ANSV) problem is to find, 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 satisfies 1 驴p驴n/((lg3n)(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 first normal hypercube ANSV algorithm that is optimal for all values of n and p. We use our ANSV algorithm to give the first O(lg n)-time n-processor normal hypercube algorithms for triangulating a monotone polygon and for constructing a Cartesian tree.