Pairing heap

Pairing heap

Pairing heaps are a type of heap data structure with relatively simple implementation and excellent practical amortized performance. However, it has proven very difficult to determine the precise asymptotic running time of pairing heaps.

Pairing heaps are heap ordered multiway trees. Describing the various heap operations is relatively simple (in the following we assume a min-heap):

  • find-min: simply return the top element of the heap.
  • merge: compare the two root elements, the smaller remains the root of the result and the subtree of the larger element is appended as a child of this root.
  • insert: create a new heap for the inserted element and merge into the original heap.
  • decrease-key: remove the subtree rooted at the key to be decreased then merge it with the heap.
  • delete-min: remove the root and merge its subtrees. Various strategies are employed.

The amortized time per delete-min is O(log n). The operations find-min, merge, and insert take O(1) amortized time and decrease-key takes 2^{O(sqrt{loglog n})} amortized time. Fredman proved that the amortized time per decrease-key is at least Omega(loglog n). That is, they are less efficient than Fibonacci heaps, which perform decrease-key in O(1) amortized time.

Stasko and Vitter and Moret and Shapiro conducted experiments on pairing heaps and other heap data structures. They concluded that the pairing heap is as fast as, and often faster than, other efficient data structures like the binary heaps.


External links

Search another word or see Pairing heapon Dictionary | Thesaurus |Spanish
Copyright © 2015, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature