Abstract
Given an array of n input numbers, the range-maxima problem is to preprocess the data so that queries of the type “what is the maximum value in subarray [i..j]” can be answered quickly using one processor. We present a randomized preprocessing algorithm that runs in O(log*n) time with high probability, using an optimal number of processors on a CRCW PRAM; each query can be processed in constant time by one processor. We also present a randomized algorithm for a parallel comparison model. Using an optimal number of processors, the preprocessing algorithm runs in O(α(n)) time with high probability; each query can be processed in O(α(n)) time by one processor. (α(n) is the inverse of Ackermann function.) A constant time query can be achieved by some slowdown in the performance of the preprocessing stage.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.