Meldable RAM priority queues and minimum directed spanning trees

  • Authors:
  • Ran Mendelson;Mikkel Thorup;Uri Zwick

  • Affiliations:
  • Tel-Aviv University, Tel-Aviv, Israel;AT&T Labs - Research, Florham Park, NJ;Tel-Aviv University, Tel-Aviv, Israel

  • Venue:
  • SODA '04 Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

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 queuenon-meldable priority queue +slow meldable priority queue ←faster meldable priority queueUsing 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 ε 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+ε) 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.