# Randomized range-maxima in nearly-constant parallel time

- 110 Downloads

## 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.

## Keywords

Constant Time Maximum Computation Complete Binary Tree Lower Common Ancestor Preprocessing Algorithm## Preview

Unable to display preview. Download preview PDF.

## References

- 1.N. Alon and Y. Azar. The average complexity of deterministic and randomized parallel comparison-sorting algorithms.
*SIAM J. Comput.*, 17:1178–1192, 1988.CrossRefGoogle Scholar - 2.N. Alon and B. Schieber. Optimal preprocessing for answering on-line product queries. Technical Report 71/87, Eskenasy Inst. of Comp. Sc., Tel Aviv Univ., 1987.Google Scholar
- 3.A. Amir, G. M. Landau, and U. Vishkin. Efficient pattern matching with scaling. In
*SODA '90*, pages 344–357, 1990.Google Scholar - 4.D. Angluin and L. G. Valiant. Fast probabilistic algorithms for hamiltonian paths and matchings.
*J. Comput. Syst. Sci.*, 18:155–193, 1979.CrossRefGoogle Scholar - 5.Y. Azar and U. Vishkin. Tight comparison bounds on the complexity of parallel sorting.
*SIAM J. Comput.*, 16:458–464, 1987.CrossRefGoogle Scholar - 6.O. Berkman, Y. Matias, and U. Vishkin. Randomized range-maxima in nearlyconstant parallel time. Technical Report UMIACS-TR-91-161, Institute for Advanced Computer Studies, Univ. of Maryland, 1991. To appear in
*j. computational complexity*.Google Scholar - 7.O. Berkman, B. Schieber, and U. Vishkin. Some doubly logarithmic parallel algorithms based on finding all nearest smaller values. Technical Report UMIACS-TR-88-79, Univ. of Maryland Inst. for Advanced Computer Studies, Oct. 1988. To appear in
*J. Algorithms*as ‘Optimal doubly logarithmic parallel algorithms based on finding all nearest smaller values'.Google Scholar - 8.O. Berkman and U. Vishkin. Recursive
^{*}-tree parallel data-structure. In*FOCS '89*, pages 196–202, 1989. Also in UMIACS-TR-90-40, Institute for Advanced Computer Studies, Uniy. of Maryland, March 1991. To appear in*SIAM J. Comput.*Google Scholar - 9.R. B. Boppana. The average-case parallel complexity of sorting.
*Inf. Process. Lett.*, 33:145–146, 1989.CrossRefGoogle Scholar - 10.A. Borodin and J. E. Hopcroft. Routing, merging, and sorting on parallel models of computation.
*J. Comput. Syst. Sci.*, 30:130–145, 1985.CrossRefGoogle Scholar - 11.H. Chernoff. A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations.
*Annals of Math. Statistics*, 23:493–507, 1952.Google Scholar - 12.P. F. Dietz. Heap construction in the parallel comparison tree model. In
*SWAT '92*, pages 140–150, July 1992.Google Scholar - 13.H. N. Gabow, J. L. Bentley, and R. E. Tarjan. Scaling and related techniques for geometry problems. In
*STOC '84*, pages 135–143, 1984.Google Scholar - 14.J. Gil and Y. Matias. Fast hashing on a PRAM—designing by expectation. In
*SODA '91*, pages 271–280, 1991.Google Scholar - 15.J. Gil, Y. Matias, and U. Vishkin. Towards a theory of nearly constant time parallel algorithms. In
*FOCS '91*, pages 698–710, Oct. 1991.Google Scholar - 16.J. Gil and L. Rudolph. Counting and packing in parallel. In
*ICPP '86*, pages 1000–1002, 1986.Google Scholar - 17.D. Harel and R. E. Tarjan. Fast algorithms for finding nearest common ancestors.
*SIAM J. Comput.*, 13(2):338–355, 1984.CrossRefGoogle Scholar - 18.P. D. MacKenzie. Load balancing requires
*Ω*(log^{*}*n*) expected time. In*SODA '92*, pages 94–99, Jan. 1992.Google Scholar - 19.Y. Matias and U. Vishkin. Converting high probability into nearly-constant time—with applications to parallel hashing. In
*STOC '91*, pages 307–316, 1991. Also in UMIACS-TR-91-65, Institute for Advanced Computer Studies, Univ. of Maryland, April 1991.Google Scholar - 20.V. Ramachandran and U. Vishkin. Efficient parallel triconnectivity in logarithmic parallel time. In
*AWOC '88*, pages 33–42, 1988.Google Scholar - 21.R. Reischuk. Probabilistic parallel algorithms for sorting and selection.
*SIAM J. Comput.*, 14(2):396–409, May 1985.Google Scholar - 22.B. Schieber.
*Design and analysis of some parallel algorithms*. PhD thesis, Dept. of Computer Science, Tel Aviv Univ., 1987.Google Scholar - 23.Y. Shiloach and U. Vishkin. Finding the maximum, merging, and sorting in a parallel computation model.
*J. of Alg.*, 2:88–102, 1981.CrossRefGoogle Scholar - 24.R. E. Tarjan. Efficiency of a good but not linear set union algorithm.
*J. ACM*, 22(2):215–225, Apr. 1975.CrossRefGoogle Scholar - 25.L. G. Valiant. Parallelism in comparison problems.
*SIAM J. Comput.*, 4:348–355, 1975.CrossRefGoogle Scholar - 26.U. Vishkin. Structural parallel algorithmics. In
*ICALP '91*, pages 363–380, 1991.Google Scholar