Skip to main content

Heaps with bits

  • Conference paper
  • First Online:
Algorithms and Computation (ISAAC 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 834))

Included in the following conference series:

Abstract

In this paper, we show how to improve the complexity of heap operations and heapsort using extra bits. We first study parallel complexity of implementing priority queue operations on a heap. While the insertion of a new element into a heap can be done as fast as parallel searching, we show how to delete the smallest element from a heap in constant time with a sublinear number of processors, and in sublogarithmic time with a sublogarithmic number of processors. The models of parallel computation used are the CREW PRAM and the CRCW PRAM. Our results improve those of previously known algorithms.

Moreover, we study a variant, fine-heap, of the traditional heap structure. A fast algorithm for constructing this new data structure is designed, which is also used to develop an improved heapsort algorithm. Our variation of heapsort is faster than McDiarmid and Reeds variant of heapsort and requires less extra space.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S. Akl. The Design and Analysis of Parallel Algorithms. Prentice-Hall, Englewood Cliffs, New Jersey, 1989.

    Google Scholar 

  2. S. Carlsson. Average-case results on heapsort. BIT, 27:2–17, 1987.

    Google Scholar 

  3. S. Carlsson. A variant of heapsort with almost optimal number of comparisons. Inf. Process. Lett., 24:247–250, 1987.

    MathSciNet  Google Scholar 

  4. J. Chen. Constructing priority queues and deques optimally in parallel. In Proceedings of the Twelfth World Computer Congress, Volume I, pages 275–283. (J. van Leeuwen, Ed.), Madrid, Spain, September 1992.

    Google Scholar 

  5. R. Floyd. Algorithm 245 — Treesort 3. Commun. ACM, 7:701, 1964.

    Article  Google Scholar 

  6. G. Gonnet and J. Munro. Heaps on heaps. SIAM J. Comput., 15:964–971, 1986.

    Article  Google Scholar 

  7. S. Haldar. Heapsort with n log(n + 1) + n − 2 log(n +1) − 2 key comparisons using [n/2] additional bits. Technical Report RUU-CS-93-14, Department of Computer Science, Utrecht University, Utrecht, The Netherlands, 1993.

    Google Scholar 

  8. D. Knuth. The Art of Computer Programming, Vol. 3: Sorting and Searching. Addison-Wesley, Reading, Massachusetts, 1973.

    Google Scholar 

  9. C. McDiarmid and B. Reed. Building heaps fast. J. Algo., 10:352–365, 1989.

    Article  Google Scholar 

  10. M. Pinotti and G. Pucci. Parallel algorithms for priority queue operations. In Proceedings of the Third Scandinavian Workshop on Algorithm Theory, pages 130–139. Lecture Notes in Computer Science Vol. 621, Springer-Verlag, 1992.

    Google Scholar 

  11. N. Rao and W. Zhang. Building heaps in parallel. Inf. Process. Lett., 37:355–358, 1991.

    Google Scholar 

  12. A. Schönhage, M. Paterson, and N. Pippenger. Finding the median. J. Comput. Syst. Sci., 13:184–199, 1976.

    Google Scholar 

  13. I. Wegener. The worst case complexity of McDiarmid and Reeds variant of BOTTOM-UP HEAPSORT is less than n log n + 1.1n. Inf. Comput., 97:86–96, 1992.

    MathSciNet  Google Scholar 

  14. I. Wegener. BOTTOM-UP-HEAPSORT, a new variant of HEAPSORT beating, on an average, QUICKSORT (if n is not very small). Theoretical Comput. Sci., 118:81–98, 1993.

    MathSciNet  Google Scholar 

  15. J. Williams. Algorithm 232: Heapsort. Commun. ACM, 7:347–348, 1964.

    Google Scholar 

  16. W. Zhang and R. Korf. Parallel heap operations on an EREW PRAM. J. Parallel Distri. Comput., 20:248–255, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Ding-Zhu Du Xiang-Sun Zhang

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Carlsson, S., Chen, J., Mattsson, C. (1994). Heaps with bits. In: Du, DZ., Zhang, XS. (eds) Algorithms and Computation. ISAAC 1994. Lecture Notes in Computer Science, vol 834. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58325-4_192

Download citation

  • DOI: https://doi.org/10.1007/3-540-58325-4_192

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-58325-7

  • Online ISBN: 978-3-540-48653-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics