Abstract
Given an array ofn input numbers, therange-maxima problem is that of preprocessing 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 inO(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 inO(α (n)) time with high probability; each query can be processed inO (α (n)) time by one processor. (As is standard, α(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.