The weak-heap data structure: Variants and applications
Authors:Stefan Edelkamp, Amr Elmasry, and Jyrki Katajainen
Published in:Journal of Discrete Algorithms 16 (2012), 187–205
Full text:<pdf.gif>PDF (431 kB)  
DOI:10.1016/j.jda.2012.04.010
Copyright:© Elsevier B.V.
Abstract:The weak heap is a priority queue that was introduced as a competitive structure for sorting. Its array-based form supports the operations find-min in O(1) worst-case time, and insert and delete-min in O(lg n) worst-case time using at most ⌈lg n⌉ element comparisons. Additionally, its pointer-based form supports delete and decrease in O(lg n) worst-case time using at most ⌈lg n⌉ element comparisons. In this paper we enhance this data structure as follows:
  1. We improve the array-based form to support insert in O(1) amortized time. The main idea is to temporarily store the inserted elements in a buffer, and, once the buffer is full, to move its elements to the heap using an efficient bulk-insertion procedure. As an application, we use this variant in the implementation of adaptive heapsort. Accordingly, we guarantee, for several measures of disorder, that the formula expressing the number of element comparisons performed by the algorithm is optimal up to the constant factor of the high-order term. Unlike other previous constant-factor-optimal adaptive sorting algorithms, adaptive heapsort relying on the developed priority queue is practically workable.
  2. We improve the pointer-based form to support insert and decrease in O(1) worst-case time per operation. The expense is that delete then requires at most 2 ⌈lg n⌉ element comparisons, but this is still better than the 3 ⌊lg n⌋ bound known for run-relaxed heaps. The main idea is to allow some nodes to violate the weak-heap ordering; we call the resulting priority queue a relaxed weak heap. We also develop a more efficient amortized variant that provides delete guaranteeing an amortized bound of 1.5 ⌈lg n⌉ element comparisons, which is better than the 2 ⌈logφ n⌉ bound known for Fibonacci heaps, where φ is the golden ratio. As an application, we use this variant in the implementation of Dijkstra’s shortest-paths algorithm. Experimental results indicate that weak heaps are practically efficient; they are competitive with other priority-queue structures when considering the number of element comparisons performed, and lose by a small margin when considering the actual running time.
Related:<html.gif>HTML (Conference paper)  <html.gif>HTML (Conference paper)  <html.gif>HTML (Source code)  <html.gif>HTML (Source code)  <html.gif>HTML (Errata)  
BibLATEX:
@article{EEK2012bJ,
  author = {Stefan Edelkamp and Amr Elmasry and Jyrki Katajainen},
  title = {The weak-heap data structure: {V}ariants and applications},
  journaltitle = {Journal of Discrete Algorithms},
  volume = {16},
  year = {2012},
  pages = {187--205},
}
This page was generated by Jyrki Katajainen <jyrki@di.ku.dk> on 2019-10-05.