|
ABSTRACT
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) + α(n)) amortized time, where α(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 queues 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(&sqrt;log 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(m&sqrt;log 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.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Alstrup, S., Gørtz, I., Rauhe, T., Thorup, M., and Zwick, U. 2005. Union-find with constant time deletions. In Proceedings of the 32th International Colloquium on Automata, Languages and Programming (ICALP). 78--89.
|
 |
2
|
|
| |
3
|
Bock, F. 1971. An algorithm to construct a minimum directed spanning tree in a directed network. In Developments in Operations Research. Gordon and Breach, New York, 29--44.
|
| |
4
|
|
| |
5
|
Camerini, P., Fratta, L., and Maffioli, F. 1979. A note on finding optimum branchings. Networks 9, 309--312.
|
 |
6
|
|
| |
7
|
Chu, Y., and Liu, T. 1965. On the shortest arborescence of a directed graph. Sci. Sinica 14, 1396--1400.
|
| |
8
|
Comrie, L. 1929. The Hollerith and Powers tabulating machines. Office Machinary Users' Association, Ltd. 25--37.
|
| |
9
|
|
| |
10
|
Dijkstra, E. 1959. A note on two problems in connexion with graphs. Numerische Mathematik 1, 269--271.
|
| |
11
|
Dumey, A. 1956. Indexing for rapid random access memory systems. Comput. Automation 5, 12, 6--9.
|
| |
12
|
Edmonds, J. 1967. Optimum branchings. J. Res. Nat. Bur. Stand. 71B, 233--240.
|
 |
13
|
|
| |
14
|
|
| |
15
|
|
| |
16
|
|
 |
17
|
|
| |
18
|
|
 |
19
|
|
| |
20
|
|
 |
21
|
|
| |
22
|
Karp, R. 1971. A simple derivation of Edmonds' algorithm for optimum branchings. Networks 1, 265--272.
|
| |
23
|
Mendelson, R., Tarjan, R., Thorup, M., and Zwick, U. 2004a. Melding priority queues. In Proceedings of the 9th Scandinavian Workshop on Algorithm Theory (SWAT). 223--235.
|
| |
24
|
|
 |
25
|
|
 |
26
|
|
| |
27
|
Tarjan, R. 1977. Finding optimum branchings. Networks 7, 25--35.
|
| |
28
|
|
| |
29
|
Tarjan, R. 1985. Amortized computational complexity. SIAM J. Algebraic Discrete Meth. 6, 306--318.
|
 |
30
|
|
| |
31
|
|
| |
32
|
Thorup, M. 2002b. Randomized sorting in O(n log log n) time and linear space using addition, shift, and bit-wise boolean operations. J. Algorithms 42, 2, 205--230.
|
| |
33
|
|
| |
34
|
van Emde Boas, P., Kaas, R., and Zijlstra, E. 1977. Design and implementation of an efficient priority queue. Mathemat. Syst. Theo. 10, 99--127.
|
|