Priority queues with decreasing keys

被引:0
作者
Brodal, Gerth Stolting [1 ]
机构
[1] Aarhus Univ, Dept Comp Sci, Aabogade 34, DK-8200 Aarhus, Denmark
关键词
Priority queue; Decreasing keys; Post-order heap; Dijkstra's algorithm; FIBONACCI HEAPS;
D O I
10.1016/j.tcs.2024.114563
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
A priority queue stores a multiset of items, each item being a (key, value) pair, and supports the insertion of a new item and extraction of an item with minimum key. In applications like Dijkstra's single source shortest path algorithm and Prim-Jarn & iacute;k's minimum spanning tree algorithm, the key of an item can decrease over time. Usually this is handled by either using a priority queue supporting the deletion of an arbitrary item or a dedicated Decrease Key operation, or by inserting the same item multiple times but with decreasing keys. In this paper we study what happens if the keys associated with the items in a priority queue can decrease over time without informing the priority queue, and how such a priority queue can be used in Dijkstra's algorithm. We show that binary heaps with bottom-up insertions fail to report items with unchanged keys in correct order, while binary heaps with top-down insertions report items with unchanged keys in correct order. Furthermore, we show that skew heaps, leftist heaps, and priority queues based on linking the roots of heap-ordered trees, like pairing heaps, binomial queues and Fibonacci heaps, work correctly with decreasing keys without any modifications. Finally, we show that the post-order heap by Harvey and Zatloukal, a variant of a binary heap with amortized constant time insertions and amortized logarithmic time deletions, works correctly with decreasing keys and is a strong contender for an implicit priority queue supporting decreasing keys in practice.
引用
收藏
页数:14
相关论文
共 23 条
  • [1] ADELSONVELSKII GM, 1962, DOKL AKAD NAUK SSSR+, V146, P263
  • [2] Brodal Gerth Stolting, 2013, Space-Efficient Data Structures, Streams, and Algorithms. Papers in Honor of J. Ian Munro on the Occasion of His 66th Birthday: LNCS 8066, P150, DOI 10.1007/978-3-642-40273-9_11
  • [3] Brodal Gerth Stolting, 2022, LIPIcs, V226, p8:1
  • [4] CARLSSON S, 1988, LECT NOTES COMPUT SC, V318, P1
  • [5] Cormen T. H., 2022, INTRO ALGORITHMS
  • [6] Crane Clark A., 1972, Linear Lists and Priority Queues as Balanced Binary Trees
  • [7] Dijkstra E. W., 1959, NUMER MATH, V1, P269, DOI [DOI 10.1007/BF01386390, 10.1007/bf01386390]
  • [8] RELAXED HEAPS - AN ALTERNATIVE TO FIBONACCI HEAPS WITH APPLICATIONS TO PARALLEL COMPUTATION
    DRISCOLL, JR
    GABOW, HN
    SHRAIRMAN, R
    TARJAN, RE
    [J]. COMMUNICATIONS OF THE ACM, 1988, 31 (11) : 1343 - 1354
  • [9] Two Skew-Binary Numeral Systems and One Application
    Elmasry, Amr
    Jensen, Claus
    Katajainen, Jyrki
    [J]. THEORY OF COMPUTING SYSTEMS, 2012, 50 (01) : 185 - 211
  • [10] The Pairing Heap: A New Form of Self-Adjusting Heap
    Fredman, Michael L.
    Sedgewick, Robert
    Sleator, Daniel D.
    Tarjan, Robert E.
    [J]. ALGORITHMICA, 1986, 1 (1-4) : 111 - 129