TY - JOUR
T1 - Melding priority queues
AU - Mendelson, Ran
AU - Tarjan, Robert E.
AU - Thorup, Mikkel
AU - Zwick, Uri
PY - 2006/10/1
Y1 - 2006/10/1
N2 - We show that any priority queue data structure that supports insert, delete, and find-min operations in pq(n) amortized time, where n is an upper bound on the number of elements in the priority queue, can be converted into a priority queue data structure that also supports fast meld operations with essentially no increase in the amortized cost of the other operations. More specifically, the new data structure supports insert, meld and find-min operations in O(1) amortized time, and delete operations in O(pq(n) + a(n)) amortized time, where a(n) is a functional inverse of the Ackermann function, and where n this time is the total number of operations performed on all the priority queues. The construction is very simple. The meldable priority queues are obtained by placing a nonmeldable priority queue at each node of a union-find data structure.We also show that when all keys are integers in the range [1, N], we can replace n in the bound stated previously by min{n, N}. Applying this result to the nonmeldable priority queue data structures obtained recently by Thorup [2002b] and by Han and Thorup [2002] we obtain meldable RAM priority queues with O(log log n)amortized time per operation, or O(vlog log n) expected amortized time per operation, respectively. As a by-product, we obtain improved algorithms for the minimum directed spanning tree problem on graphs with integer edge weights, namely, a deterministic O(m log log n)-time algorithm and a randomized O(mvlog log n)-time algorithm. For sparse enough graphs, these bounds improve on the O(m + n log n) running time of an algorithm by Gabow et al. [1986] that works for arbitrary edge weights.
AB - We show that any priority queue data structure that supports insert, delete, and find-min operations in pq(n) amortized time, where n is an upper bound on the number of elements in the priority queue, can be converted into a priority queue data structure that also supports fast meld operations with essentially no increase in the amortized cost of the other operations. More specifically, the new data structure supports insert, meld and find-min operations in O(1) amortized time, and delete operations in O(pq(n) + a(n)) amortized time, where a(n) is a functional inverse of the Ackermann function, and where n this time is the total number of operations performed on all the priority queues. The construction is very simple. The meldable priority queues are obtained by placing a nonmeldable priority queue at each node of a union-find data structure.We also show that when all keys are integers in the range [1, N], we can replace n in the bound stated previously by min{n, N}. Applying this result to the nonmeldable priority queue data structures obtained recently by Thorup [2002b] and by Han and Thorup [2002] we obtain meldable RAM priority queues with O(log log n)amortized time per operation, or O(vlog log n) expected amortized time per operation, respectively. As a by-product, we obtain improved algorithms for the minimum directed spanning tree problem on graphs with integer edge weights, namely, a deterministic O(m log log n)-time algorithm and a randomized O(mvlog log n)-time algorithm. For sparse enough graphs, these bounds improve on the O(m + n log n) running time of an algorithm by Gabow et al. [1986] that works for arbitrary edge weights.
KW - Disjoint set union
KW - Heaps
KW - Minimum directed spanning trees
KW - Optimum branchings
KW - Priority queues
KW - Union-find
KW - Word RAM model
UR - http://www.scopus.com/inward/record.url?scp=33846583487&partnerID=8YFLogxK
U2 - 10.1145/1198513.1198517
DO - 10.1145/1198513.1198517
M3 - ???researchoutput.researchoutputtypes.contributiontojournal.article???
AN - SCOPUS:33846583487
SN - 1549-6325
VL - 2
SP - 535
EP - 556
JO - ACM Transactions on Algorithms
JF - ACM Transactions on Algorithms
IS - 4
ER -