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.
Similar content being viewed by others
References
N. Alon andY. Azar, The average complexity of deterministic and randomized parallel comparison-sorting algorithms,SIAM Journal on Computing,17 (1988), 1178–1192.
N. Alon andB. Schieber, Optimal preprocessing for answering online product queries,Tech. Rep. 71/87, Eskenasy Institute of Computer Sciences, Tel Aviv University, Ramat Aviv 69978, Israel, 1987.
A. Amir, G. M. Landau, and U. Vishkin, Efficient pattern matching with scaling, inProc. of the First Annual ACM-SIAM Symposium on Discrete Algorithms, 1990, 344–357.
D. Angluin andL. G. Valiant, Fast probabilistic algorithms for hamiltonian paths and matchings,Journal of Computer and System Sciences,18 (1979), 155–193.
Y. Azar andU. Vishkin, Tight comparison bounds on the complexity of parallel sorting,SIAM Journal on Computing,16 (1987), 458–464.
O. Berkman, J. JáJá, S. Krishnamurthy, R. Thurimella, and U. Vishkin, Some triply-logarithmic parallel algorithms, inProc of the 31st IEEE Annual Symp. on Foundation of Computer Science, 1990, 871–881, also in Top-bottom routing around a rectangle is as easy as computing prefix minima, to appear inSIAM Journal on Computing.
O. Berkman, B. Schieber, and U. Vishkin, Some doubly logarithmic parallel algorithms based on finding all nearest smaller values,Tech. Rep. UMIACS-TR-88-79, Univ. of Maryland Inst. for Advanced Computer Studies, 1988, to appear inJournal of Algorithms as Optimal doubly logarithmic parallel algorithms based on finding all nearest smaller values.
O. Berkman and U. Vishkin, Recursive*-tree parallel data-structure, inProc. of the 30th IEEE Annual Symp. on Foundation of Computer Science, 1989, 196–202, also in UMIACS-TR-90-40, Institute for Advanced Computer Studies, Univ. of Maryland, 1991, to appear inSIAM Journal on Computing.
R. B. Boppana, The average-case parallel complexity of sorting,Information Processing Letters,33 (1989), 145–146.
A. Borodin andJ. E. Hopcroft, Routing, merging, and sorting on parallel models of computation,Journal of Computer and System Sciences,30 (1985), 130–145.
A. K. Chandra, S. Fortune, and R. J. Lipton, Lower bounds for constant depth circuits for prefix problems, inProc. of 10th International Colloquium on Automata Languages and Programming, Springer LNCS 154, 1983, 109–117.
S. Chaudhuri, Tight bounds for the chaining problem, in3rd Annual ACM Symposium on Parallel Algorithms and Architectures, 1991, 62–70.
H. Chernoff, A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations,Annals of Math. Statistics,23 (1952), 493–507.
P. F. Dietz, Heap construction in the parallel comparison tree model, inProc. of the Third Scandinavian Workshop on Algorithm Theory, Springer LNCS 621, 1992, 140–150.
H. N. Gabow, J. L. Bentley, and R. E. Tarjan, Scaling and related techniques for geometry problems, inProc. of the 16th Ann. ACM Symp. on Theory of Computing, 1984, 135–143.
J. Gil and Y. Matias, Fast hashing on a PRAM—designing by expectation, inProc. of the Second Annual ACM-SIAM Symposium on Discrete Algorithms, 1991, 271–280.
J. Gil, Y. Matias, and U. Vishkin, Towards a theory of nearly constant time parallel algorithms, inProc. of the 32nd IEEE Annual Symp. on Foundation of Computer Science, 1991, 698–710.
J. Gil and L. Rudolph, Counting and packing in parallel, inProc. of the International Conference on Parallel Processing and Applications, 1986, 1000–1002.
T. Hagerup, Fast parallel generation of random permutations, inProc. of 18th International Colloquium on Automata Languages and Programming, Springer LNCS 510, 1991, 405–416.
D. Harel andR. E. Tarjan, Fast algorithms for finding nearest common ancestors,SIAM Journal on Computing,13(2) (1984), 338–355.
S. Hart andM. Sharir, Non linearity of davenport-schinzel sequences and generalized path compression schemes,Combinatorica,6(2) (1986), 151–177.
P. D. MacKenzie, Load balancing requires Ω(log* n) expected time, inProc. of the Third Annual ACM-SIAM Symposium on Discrete Algorithms, 1992, 94–99.
Y. Matias and U. Vishkin, Converting high probability into nearlyconstant time—with applications to parallel hashing, inProc. of the 23rd Ann. ACM Symp. on Theory of Computing, 1991, 307–316, also in Tech. Rep. UMIACS-TR-91-65, Institute for Advanced Computer Studies, Univ. of Maryland, 1991.
F. Meyer auf der Heide and A. Wigderson, The complexity of parallel sorting, inProc. of the 26th IEEE Annual Symp. on Foundation of Computer Science, 1985, 532–540.
P. L. Ragde, The parallel simplicity of compaction and chaining, inProc. of 17th International Colloquium on Automata Languages and Programming, Springer LNCS 443, 1990, 744–751, to appear inJournal of Algorithms.
P. L. Ragde, Towards lower bounds for parallel computation over moderate sized domains, Manuscript, 1990.
V. Ramachandran and U. Vishkin, Efficient parallel triconnectivity in logarithmic parallel time, inProc. of the 3rd Aegean Workshop on Parallel Computing, Springer LNCS 319, 1988, 33–42.
R. Reischuk, Probabilistic parallel algorithms for sorting and selection,SIAM Journal on Computing,14(2) (1985), 396–409.
B. Schieber,Design and analysis of some parallel algorithms, PhD thesis, Dept. of Computer Science, Tel Aviv Univ., 1987.
Y. Shiloach andU. Vishkin, Finding the maximum, merging, and sorting in a parallel computation model,Journal of Algorithms,2 (1981), 88–102.
R. E. Tarjan, Efficiency of a good but not linear set union algorithm,Journal of the ACM,22(2) (1975), 215–225.
L. G. Valiant, Parallelism in comparison problems,SIAM Journal on Computing,4 (1975), 348–355.
U. Vishkin, Structural parallel algorithmics, inProc. of 18th International Colloquium on Automata Languages and Programming, Springer LNCS 510, 1991, 363–380.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Berkman, O., Matias, Y. & Vishkin, U. Randomized range-maxima in nearly-constant parallel time. Comput Complexity 2, 350–373 (1992). https://doi.org/10.1007/BF01200429
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF01200429