Abstract

AbstractBrodal recently introduced the first implementation of imperative priority queues to supportfindMin, insertandmeldinO(1) worst-case time, anddeleteMininO(logn) worst-case 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 inO(logn) time. Specifically, we derive our implementation from binomial queues in three steps: first, we reduce the running time ofinserttoO(1) by eliminating the possibility of cascading links; second, we reduce the running time offindMintoO(1) by adding a global root to hold the minimum element; and finally, we reduce the running time ofmeldtoO(1) by allowing priority queues to contain other priority queues. Each of these steps is expressed using ML-style functors. The last transformation, known as data-structural bootstrapping, is an interesting application of higher-order functors and recursive structures.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.