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.
Preview
Unable to display preview. Download preview PDF.
References
S. Akl. The Design and Analysis of Parallel Algorithms. Prentice-Hall, Englewood Cliffs, New Jersey, 1989.
S. Carlsson. Average-case results on heapsort. BIT, 27:2–17, 1987.
S. Carlsson. A variant of heapsort with almost optimal number of comparisons. Inf. Process. Lett., 24:247–250, 1987.
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.
R. Floyd. Algorithm 245 — Treesort 3. Commun. ACM, 7:701, 1964.
G. Gonnet and J. Munro. Heaps on heaps. SIAM J. Comput., 15:964–971, 1986.
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.
D. Knuth. The Art of Computer Programming, Vol. 3: Sorting and Searching. Addison-Wesley, Reading, Massachusetts, 1973.
C. McDiarmid and B. Reed. Building heaps fast. J. Algo., 10:352–365, 1989.
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.
N. Rao and W. Zhang. Building heaps in parallel. Inf. Process. Lett., 37:355–358, 1991.
A. Schönhage, M. Paterson, and N. Pippenger. Finding the median. J. Comput. Syst. Sci., 13:184–199, 1976.
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.
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.
J. Williams. Algorithm 232: Heapsort. Commun. ACM, 7:347–348, 1964.
W. Zhang and R. Korf. Parallel heap operations on an EREW PRAM. J. Parallel Distri. Comput., 20:248–255, 1994.
Author information
Authors and Affiliations
Editor information
Rights 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