Abstract
A data structure that implements a mergeable double-ended priority queue, namely therelaxed min-max heap, is presented. A relaxed min-max heap ofn items can be constructed inO(n) time. In the worst case, operationsfind_min() andfind_max() can be performed in constant time, while each of the operationsmerge(),insert(),delete_min(),delete_max(),decrease_key(), anddelete_key() can be performed inO(logn) time. Moreover,insert() hasO(1) amortized running time. If lazy merging is used,merge() will also haveO(1) worst-case and amortized time. The relaxed min-max heap is the first data structure that achieves these bounds using only two pointers (puls one bit) per item.
Similar content being viewed by others
References
[ASSS86] Atkinson, M., Sack, J., Santoro, N., Strothotte, T.: Min-max heaps, and generalized priority queues. Commun. ACM29, 996–1000 (1986)
[B78] Brown, M.: Implementation and analysis of binomial queue algorithms. SIAM J. Comput.7, 298–319 (1978)
[C87] Carlsson, S.: The deap — a double-ended heap to implement double-ended priority queues. Inf. Process. Lett.26, 33–36 (1987)
[DGST88] Driscoll, J., Gabow, H., Shrairman, R.: Relaxed Heaps: An alternative to fibonacci heaps with applications to parallel computation. Commun. ACM31, 1343–1354 (1988)
[F64] Floyd, R.: Algorithm 245: Treesort. Commun. ACM7, 701 (1964)
[FSST86] Fredman, M., Sedgewick, R., Sleator, D., Tarjan, R.: The pairing heap: a new form of self-adjusting heap. Algorithmica1, 111–129 (1986)
[FT87] Fredman, M., Tarjan, R.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM34, 596–615 (1987)
[GNT91] Gambosi, G., Nardelli, E., Talamo, M.: A pointer-free data structure for merging heaps and min-max heaps. Theor. Comput. Sci.84, 107–126 (1991)
[HS87] Hasham, A., Sack, J.: Bounds for min-max heaps. BIT27, 315–323 (1987)
[K73] Knuth, D.: The art of computer programming, vol. 3. Reading, MA: Addison-Wesley 1973
[OOW91] Olariu, S., Overstreet, C., Wen, Z.: A mergeable double-ended priority queue. Comput. J.34, 423–427 (1991)
[SS85] Sack, J., Strothotte, T.: An algorithm for merging heaps. Acta Inf.22, 171–186 (1985)
[ST86] Sleator, D., Tarjan, R.: Self-adjusting heaps. SIAM J. Comput.15, 52–69 (1986)
[V78] Vuillemin, J.: A data structure for manipulating priority queues. Commun. ACM21, 309–315 (1978)
[W64] Williams, J.: Algorithm 232: Heapsort. Commun. ACM7, 347–348 (1964)
[W92] Weiss, M.A.: Data structures and algorithm analysis. Redwood City, CA: Benjamin/Cummings 1992
Author information
Authors and Affiliations
Additional information
This research was carried out in summer 1991 when the author was with Florida International University
Rights and permissions
About this article
Cite this article
Ding, Y., Weiss, M.A. The relaxed min-max heap. Acta Informatica 30, 215–231 (1993). https://doi.org/10.1007/BF01179371
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF01179371