Publication View

Optimal Purely Functional Priority Queues (1996)

Abstract
Brodal recently introduced the first implementation of imperative priority queues to support findMin, insert, and meld in O(1) worst-case time, and deleteMin in O(log n) worstcase time. These bounds are asymptotically optimal among all comparison-based priority queues. In this paper, we adapt Brodal's data structure to a purely functional setting. In doing so, we both simplify the data structure and clarify its relationship to the binomial queues of Vuillemin, which support all four operations in O(log n) time. Specifically, we derive our implementation from binomial queues in three steps: first, we reduce the running time of insert to O(1) by eliminating the possibility of cascading links; second, we reduce the running time of findMin to O(1) by adding a global root to hold the minimum element; and finally, we reduce the running time of meld to O(1) by allowing priority queues to contain other priority queues. Each of these steps is expressed using ML-style functors. The last transfo...

Publication details
Download http://citeseerx.ist.psu.edu/viewdoc/summary?doi=?doi=10.1.1.44.6725
Source http://www.brics.dk/~gerth/Papers/jfp96.ps.gz
Publisher MIT Press
Contributors CiteSeerX
Repository CiteSeerX - Scientific Literature Digital Library and Search Engine (United States)
Type text
Language English
Relation 10.1.1.133.4630, 10.1.1.14.2642, 10.1.1.47.8825, 10.1.1.35.4046, 10.1.1.10.4209, 10.1.1.55.5156, 10.1.1.48.9435, 10.1.1.47.6536, 10.1.1.32.1475, 10.1.1.16.5771, 10.1.1.56.8717, 10.1.1.54.4293