Parallel heap construction using multiple selection

  • Jingsen Chen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 854)


We consider the problem of constructing data structures that implement priority queues (viz. the heap) and double-ended priority queues (namely, the twin-heap, the min-max heap, and the deap) quickly and optimally in parallel. Whereas all these heap-like structures can be built in linear sequential time, we show in this paper that the construction problem can be solved in O(log n·log*n/log log n) time using n·log log n/log n·log *n processors in the Arbitrary CRCW PRAM model. Moreover, by applying random sampling techniques, we reduce the construction time to O with probability ≥ 1−n−c for some constant c>0. As a by-product, we also investigate the parallel complexity of the multiple selection problem. The problem is to select a subset of elements having specified ranks from a given set. We design optimal solutions to the problem with respect to various models of parallel computation.


Data structures priority queues double-ended priority queues multiple selection parallel algorithms 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    A. V. Aho, J. E. Hopocroft, and J. D. Ullman: The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, Massachusetts, 1974.Google Scholar
  2. 2.
    S. G. Akl: The Design and Analysis of Parallel Algorithms. Prentice-Hall, Englewood Cliffs, New Jersey, 1989.Google Scholar
  3. 3.
    M. D. Atkinson, J.-R. Sack, N. Santoro, and Th. Strothotte: Min-max heaps and generalized priority queues. Communications of the ACM 29 (10) (1986), 996–1000.Google Scholar
  4. 4.
    Y. Azar and N. Pippenger: Parallel selection. Discrete Applied Mathematics 27 (1–2) (1990), 49–58.Google Scholar
  5. 5.
    M. Blum, R. W. Floyd, V. Pratt, R. L. Rivest, and R. E. Tarjan: Time bounds for selection. Journal of Computer and System Sciences 7 (4) (1973), 448–461.Google Scholar
  6. 6.
    R. P. Brent: The parallel evaluation of general arithmetic expressions. Journal of the ACM 21 (2) (1974), 201–206.Google Scholar
  7. 7.
    S. Carlsson: The deap — A double-ended heap to implement double-ended priority queues. Information Processing Letters 26 (1) (1987), 33–36.Google Scholar
  8. 8.
    S. Carlsson and J. Chen: Parallel constructions of heaps and min-max heaps. Parallel Processing Letters 2 (4) (1992), 311–320.Google Scholar
  9. 9.
    J. Chen: Constructing priority queues and deques optimally in parallel. Proceedings of the Twelfth World Computer Congress, Volume I, (J. van Leeuwen, Ed.) Madrid, Spain (1992), 275–283.Google Scholar
  10. 10.
    R. J. Cole: An optimally efficient selection algorithm. Information Processing Letters 26 (1987/88) 295–299.Google Scholar
  11. 11.
    R. J. Cole: Parallel merge sort. SIAM Journal on Computing 17 (1988) 770–785.Google Scholar
  12. 12.
    R. J. Cole and U. Vishkin: Faster optimal prefix sums and list ranking. Information and Control 81 (1989) 334–352.Google Scholar
  13. 13.
    P. F. Dietz: Heap construction in the parallel comparison tree model. In: Proceedings of the 3rd Scandinavian Workshop on Algorithm Theory (1992), 140–150.Google Scholar
  14. 14.
    R. W. Floyd: Algorithm 245 — Treesort 3. Communications of the ACM 7 (12) (1964), 701.Google Scholar
  15. 15.
    R. W. Floyd and R. L. Rivest: Expected time bounds for selection. Communications of the ACM 18 (1975) 165–172.Google Scholar
  16. 16.
    M. L. Fredman and T. H. Spencer: Refined complexity analysis for heap operations. Journal of Computer and System Sciences 35 (3) (1987), 269–284.Google Scholar
  17. 17.
    G. H. Gonnet and J. I. Munro: Heaps on heaps. SIAM Journal on Computing 15 (4) (1986), 964–971.Google Scholar
  18. 18.
    D. E. Knuth: The Art of Computer Programming. Vol. 3: Sorting and Searching. Addison-Wesley, Reading, Massachusetts, 1973.Google Scholar
  19. 19.
    S. Rajasekaran and J. H. Reif: Derivation of randomized sorting and selection algorithms. Technical Report, Aiken Computing Lab., Harvard University, 1987.Google Scholar
  20. 20.
    N. S. V. Rao and W. Zhang: Building heaps in parallel. Information Processing Letters 37 (1991) 355–358.Google Scholar
  21. 21.
    Th. Strothotte, P. Eriksson, and S. Vallner: A note on constructing min-max heaps. BIT 29 (2) (1989), 251–256.Google Scholar
  22. 22.
    L. G. Valiant: Parallelism in comparison problems. SIAM Journal on Computing 4 (1975) 348–355.Google Scholar
  23. 23.
    J. W. J. Williams: Algorithm 232: Heapsort. Communications of the ACM 7 (6) (1964), 347–348.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  • Jingsen Chen
    • 1
  1. 1.Department of Computer ScienceLuleå UniversityLuleåSweden

Personalised recommendations