## Rank-Pairing Heaps

### Cached

### Download Links

Citations: | 1 - 0 self |

### BibTeX

@MISC{Haeupler_rank-pairingheaps,

author = {Bernhard Haeupler and Siddhartha Sen and Robert E. Tarjan},

title = {Rank-Pairing Heaps},

year = {}

}

### OpenURL

### Abstract

Abstract. We introduce the rank-pairing heap, a heap (priority queue) implementation that combines the asymptotic efficiency of Fibonacci heaps with much of the simplicity of pairing heaps. Unlike all other heap implementations that match the bounds of Fibonacci heaps, our structure needs only one cut and no other structural changes per key decrease; the trees representing the heap can evolve to have arbitrary structure. Our initial experiments indicate that rankpairing heaps perform almost as well as pairing heaps on typical input sequences and better on worst-case sequences. 1

### Citations

1612 | A note on two problems in connexion with graphs
- Dijkstra
(Show Context)
Citation Context ... [2]. Fredman and Tarjan [11, 12] invented the Fibonacci heap specifically to support key decrease operations in O(1) time, which allows efficient implementation of Dijkstra’s shortest path algorithm =-=[4, 12]-=- and several other algorithms [6, 12, 13]. Fibonacci heaps support deletion of the minimum or of an arbitrary item in O(log n) amortized time and the other heap operations in O(1) amortized time. Seve... |

744 | The Art of Computer Programming, Volume 3: Sorting and Searching - Knuth - 1973 |

591 |
Fibonacci heaps and their uses in improved network optimization algorithms
- Fredman, Tarjan
(Show Context)
Citation Context ...ose directly related to our work. The binomial queue of Vuillemin [28] supports all the heap operations in O(log n) worst-case time per operation and performs well in practice [2]. Fredman and Tarjan =-=[11, 12]-=- invented the Fibonacci heap specifically to support key decrease operations in O(1) time, which allows efficient implementation of Dijkstra’s shortest path algorithm [4, 12] and several other algorit... |

358 |
The Art of Computer Programming, Volume 1: Fundamental Algorithms, 2nd ed
- Knuth
- 1973
(Show Context)
Citation Context ...al experiments comparing rank-pairing heaps with pairing heaps. Section 7 concludes and mentions some open problems. 2 One-Pass Binomial Queues We represent a heap by a set of half-ordered half trees =-=[10, 18]-=- whose nodes are the items in the heap. A half tree is a binary tree whose right subtree is missing. A halfordered binary tree is a binary tree in which each node has a key, such that the key of a nod... |

236 | A dichromatic framework for balanced trees - GUIBAS, SEDGEWICK - 1978 |

184 |
An algorithm for the organization of information
- ADEL’SON-VEL’SKII, LANDIS
- 1962
(Show Context)
Citation Context ...ed ancestors, which is one reason Fibonacci heaps do not perform well in practice. There are many other ways to accomplish the same objective: adapt a known balanced tree structure, such as AVL trees =-=[1]-=- or red-black trees [17]; devise a new balance rule, as in Høyer’s one-step heaps [20] (thick heaps [23]), or thin heaps [23]; or do more-global rebuilding, as in violation heaps [10] and quake heaps ... |

161 |
Trans-dichotomous algorithms for minimum spanning trees and shortest paths
- Fredman, Willard
(Show Context)
Citation Context ...ported heap operations takes O(1) amortized time. These bounds match the lower bound. (The logarithmic lower bound can be beaten in a more powerful model of computation that allows multiway branching =-=[15, 19]-=-.) Many heap implementations have been proposed over the years. We mention only those directly related to our work. The binomial queue of Vuillemin [34] supports all the heap 1 Massachusetts Institute... |

143 |
Amortized computational complexity
- TARJAN
- 1983
(Show Context)
Citation Context ... ∆ > 0. – delete(x, H): delete item x from heap H. We break ties between equal keys using any total order of the items. We allow only binary comparisons of keys, and we study the amortized efficiency =-=[26]-=- of heap operations. We assign to each configuration of the data structure a non-negative potential, initially zero. We define the amortized time of an operation to be its actual time plus the change ... |

89 |
Efficient algorithms for finding minimum spanning trees in undirected and directed graphs
- Gabow, Galil, et al.
(Show Context)
Citation Context ...ented the Fibonacci heap specifically to support key decrease operations in O(1) time, which allows efficient implementation of Dijkstra’s shortest path algorithm [4, 12] and several other algorithms =-=[6, 12, 13]-=-. Fibonacci heaps support deletion of the minimum or of an arbitrary item in O(log n) amortized time and the other heap operations in O(1) amortized time. Several years later, Fredman et al. [10] intr... |

88 | A data structure for manipulating priority queues
- Vuillemin
- 1978
(Show Context)
Citation Context ...me. These bounds match the lower bound. Many heap implementations have been proposed over the years. See e.g. [17]. We mention only those directly related to our work. The binomial queue of Vuillemin =-=[28]-=- supports all the heap operations in O(log n) worst-case time per operation and performs well in practice [2]. Fredman and Tarjan [11, 12] invented the Fibonacci heap specifically to support key decre... |

82 |
Relaxed heaps: An alternative to Fibonacci heaps with applications to parellel computation
- Driscoll, Gabow, et al.
(Show Context)
Citation Context ...d pairing heaps. Some of this work obtained better bounds but only by making the data structure more complicated. In particular, the bounds of Fibonacci heaps can be made worst-case: runrelaxed heaps =-=[5]-=- and fat heaps [16] achieve the bounds except for melding, which takes O(log n) time worst-case, and a very complicated data structure of Brodal [1] achieves all the bounds worst-case. Also, Fredman’s... |

81 |
Computing edge-connectivity in multigraphs and capaciated graphs
- Nagmochi, Ibaraki
- 1992
(Show Context)
Citation Context ... sequences [27] obtained by running Dijkstra’s shortest paths algorithm [4] on graphs that maximize heap size and the number of key decreases, respectively; the NagamochiIbaraki minimum-cut algorithm =-=[22]-=- on a random graph; and heapsort. The second set consists of heap operation sequences obtained by running two-way Dijkstra between random pairs of nodes on real road networks. The third set tests key ... |

47 |
The pairing heap: A new form of self-adjusting heap
- Fredman, Sedgewick, et al.
- 1986
(Show Context)
Citation Context ..., 12, 13]. Fibonacci heaps support deletion of the minimum or of an arbitrary item in O(log n) amortized time and the other heap operations in O(1) amortized time. Several years later, Fredman et al. =-=[10]-=- introduced a self-adjusting heap implementation called the pairing heap that supports all the heap operations in O(log n) amortized time. Fibonacci heaps do not perform well in practice [20, 21], but... |

41 |
Implementation and analysis of binomial queue algorithms
- Brown
- 1978
(Show Context)
Citation Context ...[17]. We mention only those directly related to our work. The binomial queue of Vuillemin [28] supports all the heap operations in O(log n) worst-case time per operation and performs well in practice =-=[2]-=-. Fredman and Tarjan [11, 12] invented the Fibonacci heap specifically to support key decrease operations in O(1) time, which allows efficient implementation of Dijkstra’s shortest path algorithm [4, ... |

36 | Fredman and Robert Endre Tarjan. Fibonacci heaps and their uses in improved network optimization algorithms - Michael - 1987 |

32 | Worst-case efficient priority queues
- Brodal
- 1996
(Show Context)
Citation Context ...acci heaps can be made worst-case: runrelaxed heaps [5] and fat heaps [16] achieve the bounds except for melding, which takes O(log n) time worst-case, and a very complicated data structure of Brodal =-=[1]-=- achieves all the bounds worst-case. Also, Fredman’s lower bound can be matched: very recently Elmasry [8] has proposed an alternative to pairing heaps that does not store subtree size information but... |

31 |
Pairing heaps: Experiments and analysis
- Stasko
- 1987
(Show Context)
Citation Context ... [20, 21], but pairing heaps do [20, 21]. Fredman et al. conjectured that pairing heaps have the same amortized efficiency as Fibonacci heaps, but despite empirical evidence supporting the conjecture =-=[20, 25]-=-, Fredman [9] showed that it is not true: pairing heaps and related data structures that do not store subtree size information require Ω(log log n) amortized time per key decrease. In contrast, the be... |

28 |
Integer sorting in O(n √ log log n) expected time and linear space
- HAN, THORUP
(Show Context)
Citation Context ...ported heap operations takes O(1) amortized time. These bounds match the lower bound. (The logarithmic lower bound can be beaten in a more powerful model of computation that allows multiway branching =-=[15, 19]-=-.) Many heap implementations have been proposed over the years. We mention only those directly related to our work. The binomial queue of Vuillemin [34] supports all the heap 1 Massachusetts Institute... |

27 | Integer priority queues with decrease key in constant time and the single source shortest paths problem - Thorup - 2003 |

21 | H.: An empirical analysis of algorithms for constructing a minimum spanning tree
- Moret, Shapiro
- 1991
(Show Context)
Citation Context ...n et al. [10] introduced a self-adjusting heap implementation called the pairing heap that supports all the heap operations in O(log n) amortized time. Fibonacci heaps do not perform well in practice =-=[20, 21]-=-, but pairing heaps do [20, 21]. Fredman et al. conjectured that pairing heaps have the same amortized efficiency as Fibonacci heaps, but despite empirical evidence supporting the conjecture [20, 25],... |

20 | Equivalence between priority queues and sorting - Thorup |

18 | C.: Optimal purely functional priority queues - Brodal, Okasaki - 1996 |

17 |
Meldable heaps and Boolean union-find
- Kaplan, Shafrir, et al.
- 2002
(Show Context)
Citation Context ...e application does not provide this information and melds occur, one needs a separate disjoint set data structure to maintain the partition of items into heaps. To find an item’s heap takes ω(1) time =-=[15]-=-. We shall modify one-pass binomial queues to support key decrease, obtaining rankpairing heaps, or rp-heaps. We make two changes to the data structure. First, we need to provide access from each node... |

14 |
A balanced tree scheme for meldable heaps with updates
- Peterson
- 1987
(Show Context)
Citation Context ...mortized time for a key decrease. Working in a different direction, several authors proposed data structures with the same amortized efficiency as Fibonacci heaps but intended to be simpler. Peterson =-=[23]-=- gave a structure based on AVL trees. Høyer [14] gave several structures, including ones based on red-black trees, AVL trees, and a, b-trees. Høyer’s simplest structure is one he calls a one-step heap... |

14 | Tarjan, Efficient algorithms for finding minimum spanning trees in undirected and directed graphs, Combinatorica - Gabow, Galil, et al. - 1986 |

12 |
On the efficiency of pairing heaps and related data structures
- Fredman
- 1999
(Show Context)
Citation Context ...ring heaps do [20, 21]. Fredman et al. conjectured that pairing heaps have the same amortized efficiency as Fibonacci heaps, but despite empirical evidence supporting the conjecture [20, 25], Fredman =-=[9]-=- showed that it is not true: pairing heaps and related data structures that do not store subtree size information require Ω(log log n) amortized time per key decrease. In contrast, the best known uppe... |

12 |
Three priority queue applications revisited
- Liao
- 1992
(Show Context)
Citation Context ...n et al. [10] introduced a self-adjusting heap implementation called the pairing heap that supports all the heap operations in O(log n) amortized time. Fibonacci heaps do not perform well in practice =-=[20, 21]-=-, but pairing heaps do [20, 21]. Fredman et al. conjectured that pairing heaps have the same amortized efficiency as Fibonacci heaps, but despite empirical evidence supporting the conjecture [20, 25],... |

12 | Theory of 2-3 heaps - Takaoka - 1999 |

11 |
New heap data structures
- Kaplan, Tarjan
- 1999
(Show Context)
Citation Context ...ome of this work obtained better bounds but only by making the data structure more complicated. In particular, the bounds of Fibonacci heaps can be made worst-case: runrelaxed heaps [5] and fat heaps =-=[16]-=- achieve the bounds except for melding, which takes O(log n) time worst-case, and a very complicated data structure of Brodal [1] achieves all the bounds worst-case. Also, Fredman’s lower bound can be... |

10 | A general technique for implemention of efficient priority queues
- Høyer
- 1995
(Show Context)
Citation Context ...ifferent direction, several authors proposed data structures with the same amortized efficiency as Fibonacci heaps but intended to be simpler. Peterson [23] gave a structure based on AVL trees. Høyer =-=[14]-=- gave several structures, including ones based on red-black trees, AVL trees, and a, b-trees. Høyer’s simplest structure is one he calls a one-step heap. Kaplan and Tarjan [17] filled a lacuna in Høye... |

10 | Towards a final analysis of pairing heaps
- Pettie
- 2005
(Show Context)
Citation Context ... pairing heaps and related data structures that do not store subtree size information require Ω(log log n) amortized time per key decrease. In contrast, the best known upper bound is O(2 2√ lg lg n ) =-=[24]-=- amortized time 5 . These results motivated work to improve Fibonacci heaps and pairing heaps. Some of this work obtained better bounds but only by making the data structure more complicated. In parti... |

10 | Two-tier relaxed heaps - Elmasry, Jensen, et al. - 2006 |

6 |
The Weak-Heap Data Structure
- Dutton
- 1992
(Show Context)
Citation Context ... x that is a left child. This is just the parent of x in the heap-ordered representation. The half-ordered representation appears in the original paper on pairing heaps [13]. Peterson [29] and Dutton =-=[8]-=- each independently reinvented it, unfortunately swapping left and right. We shall use the half-ordered representation in its original form, which is consistent with Knuth’s description [24]. The half... |

6 | Theory of trinomial heaps - Takaoka - 2000 |

5 | Pairing heaps with O(log log n) decrease cost
- Elmasry
- 2009
(Show Context)
Citation Context ...elding, which takes O(log n) time worst-case, and a very complicated data structure of Brodal [1] achieves all the bounds worst-case. Also, Fredman’s lower bound can be matched: very recently Elmasry =-=[8]-=- has proposed an alternative to pairing heaps that does not store subtree size information but takes O(log log n) amortized time for a key decrease. Working in a different direction, several authors p... |

3 |
Quake Heaps: A Simple Alternative to Fibonacci Heaps, 2009; available online at http://www.cs.uwaterloo.ca/∼tmchan/heap.ps
- Chan
(Show Context)
Citation Context ...n [17] filled a lacuna in Høyer’s presentation of this heap and gave a related structure, the thin heap. Independently of our own work but concurrently, Elmasry [7] developed violation heaps and Chan =-=[3]-=- quake heaps. In all these structures, the trees representing the heap satisfy a balance property. As a result, a key decrease must in general do restructuring to restore balance. Our insight is that ... |

3 | Tarjan, Thin heaps, thick heaps
- Kaplan, E
- 2008
(Show Context)
Citation Context ...kes O(log n) amortized time, and each of the other heap operations takes O(1) amortized time. These bounds match the lower bound. Many heap implementations have been proposed over the years. See e.g. =-=[17]-=-. We mention only those directly related to our work. The binomial queue of Vuillemin [28] supports all the heap operations in O(log n) worst-case time per operation and performs well in practice [2].... |

3 |
AND ROBERT ENDRE TARJAN, Efficient algorithms for finding minimum spanning trees in undirected and directed graphs
- GABOW, GALIL, et al.
- 1986
(Show Context)
Citation Context ... Fibonacci heap specifically to support key decrease operations in O(1) time, which allows efficient implementation of Dijkstra’s shortest path algorithm [6, 14], Edmonds’ minimum branching algorithm =-=[9, 16]-=-, and certain minimum spanning tree algorithms [14, 16]. Fibonacci heaps support deletion of the minimum or of an arbitrary item in O(log n) amortized time and the other heap operations in O(1) amorti... |

2 | Violation heaps: A better substitute for Fibonacci heaps. Research report
- Elmasry
- 2008
(Show Context)
Citation Context ...calls a one-step heap. Kaplan and Tarjan [17] filled a lacuna in Høyer’s presentation of this heap and gave a related structure, the thin heap. Independently of our own work but concurrently, Elmasry =-=[7]-=- developed violation heaps and Chan [3] quake heaps. In all these structures, the trees representing the heap satisfy a balance property. As a result, a key decrease must in general do restructuring t... |

2 | The violation heap: A relaxed Fibonacci-like heap - Elmasry |

2 | Tarjan, Rank-pairing heaps - Haeupler, Sen, et al. |

1 |
The Fifth DIMACS Challenge—Priority Queue Tests
- VARIOUS
- 1996
(Show Context)
Citation Context ... (Table 1). Our measure of performance is the total number of field updates performed by each heap implementation. The first set of experiments consists of publicly available heap operation sequences =-=[27]-=- obtained by running Dijkstra’s shortest paths algorithm [4] on graphs that maximize heap size and the number of key decreases, respectively; the NagamochiIbaraki minimum-cut algorithm [22] on a rando... |

1 |
BRODAL AND CHRIS OKASAKI, Optimal purely functional priority queues
- STØLTING
- 1996
(Show Context)
Citation Context ...s can be made worst-case: run-relaxed heaps [7] and fat heaps [22] achieve the bounds except for melding, which takes O(log n) time worst-case, data structures of Brodal [2] and of Brodal and Okasaki =-=[3]-=- achieve the bounds except for key decrease, which takes O(log n) time in the worst case, and a very complicated data structure of Brodal [2] achieves all the bounds worst-case. Also, Elmasry [11] has... |

1 |
GUIBAS AND ROBERT SEDGEWICK, A dichromatic framework for balanced trees
- LEO
- 1978
(Show Context)
Citation Context ...one reason Fibonacci heaps do not perform well in practice. There are many other ways to accomplish the same objective: adapt a known balanced tree structure, such as AVL trees [1] or red-black trees =-=[17]-=-; devise a new balance rule, as in Høyer’s one-step heaps [20] (thick heaps [23]), or thin heaps [23]; or do more-global rebuilding, as in violation heaps [10] and quake heaps [5]. Another approach, u... |