Two new methods for constructing double-ended priority queues from priority queues |
| |
Authors: | Amr Elmasry Claus Jensen Jyrki Katajainen |
| |
Affiliation: | 1.Max-Planck Institut für Informatik,Saarbrücken,Germany;2.Datalogisk Institut, K?benhavns Universitet,Copenhagen East,Denmark |
| |
Abstract: | We introduce two data-structural transformations to construct double-ended priority queues from priority queues. To apply our transformations the priority queues exploited must support the extraction of an unspecified element, in addition to the standard priority-queue operations. With the first transformation we obtain a double-ended priority queue which guarantees the worst-case cost of O(1) for find-min, find-max, insert, extract; and the worst-case cost of O(lg n) with at most lg n + O(1) element comparisons for delete. With the second transformation we get a meldable double-ended priority queue which guarantees the worst-case cost of O(1) for find-min, find-max, insert, extract; the worst-case cost of O(lg n) with at most lg n + O(lg lg n) element comparisons for delete; and the worst-case cost of O(min {lg m, lg n}) for meld. Here, m and n denote the number of elements stored in the data structures prior to the operation in question. The work of the authors was partially supported by the Danish Natural Science Research Council under contracts 21-02-0501 (project Practical data structures and algorithms) and 272-05-0272 (project Generic programming—algorithms and tools). A. Elmasry was supported by Alexander von Humboldt fellowship. |
| |
Keywords: | Data structures Priority queues Double-ended priority queues Min-max priority queues Priority deques Meticulous analysis Comparison complexity |
本文献已被 SpringerLink 等数据库收录! |
|