Meldable RAM priority queues and minimum directed spanning trees

Ran Mendelson*, Mikkel Thorup, Uri Zwick

*Corresponding author for this work

Research output: Contribution to conferencePaperpeer-review


We consider the implementation of meldable priority queues with integer keys in the RAM model. We present two new general techniques for transforming non-meldable priority queues into meldable ones. These transformations can be described symbolically as: non-meldable priority queue + union-find → meldable priority queue non-meldable priority queue + slow meldable priority queue → faster meldable priority queue Using the first transformation to combine a recent non-meldable RAM priority queue of Thorup with the classical union-find data structure we obtain a meldable RAM priority queue with an amortized cost of O(log log n·α(n)) per operation, where α(n) = α(n, n) is the inverse Ackermann function. Using instead a randomized priority queue of Han and Thorup we obtain an expected amortized cost of O(√log log n · α(n)) per operation. The second transformation yields slower meldable priority queues, but the obtained queues can support the insert, find-min and decrease-key operations in constant time. In particular, by combining a randomized "atomic-heap" of Thorup with, e.g., the classical Fibonacci heaps of Fredman and Tarjan, we obtain, for every fixed e > 0, a meldable priority queue with an expected amortized cost of O(1) for each insert, find-min and decrease-key operation, and an expected amortized cost of O((log n)1/2+e) for each delete or meld operation. Using the meldable priority queues of the first type, we obtain improved algorithms for finding minimum directed spanning trees in graphs with integer edge weights: a deterministic O(m · log log n · α(n)) time algorithm and a randomized O(m · √log log n · α(n)) expected time algorithm. These bounds improve, for very sparse graphs, on the O(m + n log n) running time of an algorithm by Gabow, Galil, Spencer and Tarjan that works for arbitrary edge weights.

Original languageEnglish
Number of pages9
StatePublished - 2004
EventProceedings of the Fifteenth Annual ACM-SIAM Symposium on Discrete Algorithms - New Orleans, LA., United States
Duration: 11 Jan 200413 Jan 2004


ConferenceProceedings of the Fifteenth Annual ACM-SIAM Symposium on Discrete Algorithms
Country/TerritoryUnited States
CityNew Orleans, LA.


Dive into the research topics of 'Meldable RAM priority queues and minimum directed spanning trees'. Together they form a unique fingerprint.

Cite this