95 research outputs found
Heaps Simplified
The heap is a basic data structure used in a wide variety of applications,
including shortest path and minimum spanning tree algorithms. In this paper we
explore the design space of comparison-based, amortized-efficient heap
implementations. From a consideration of dynamic single-elimination
tournaments, we obtain the binomial queue, a classical heap implementation, in
a simple and natural way. We give four equivalent ways of representing heaps
arising from tournaments, and we obtain two new variants of binomial queues, a
one-tree version and a one-pass version. We extend the one-pass version to
support key decrease operations, obtaining the {\em rank-pairing heap}, or {\em
rp-heap}. Rank-pairing heaps combine the performance guarantees of Fibonacci
heaps with simplicity approaching that of pairing heaps. Like pairing heaps,
rank-pairing heaps consist of trees of arbitrary structure, but these trees are
combined by rank, not by list position, and rank changes, but not structural
changes, cascade during key decrease operations
A Back-to-Basics Empirical Study of Priority Queues
The theory community has proposed several new heap variants in the recent
past which have remained largely untested experimentally. We take the field
back to the drawing board, with straightforward implementations of both classic
and novel structures using only standard, well-known optimizations. We study
the behavior of each structure on a variety of inputs, including artificial
workloads, workloads generated by running algorithms on real map data, and
workloads from a discrete event simulator used in recent systems networking
research. We provide observations about which characteristics are most
correlated to performance. For example, we find that the L1 cache miss rate
appears to be strongly correlated with wallclock time. We also provide
observations about how the input sequence affects the relative performance of
the different heap variants. For example, we show (both theoretically and in
practice) that certain random insertion-deletion sequences are degenerate and
can lead to misleading results. Overall, our findings suggest that while the
conventional wisdom holds in some cases, it is sorely mistaken in others
Hollow Heaps
We introduce the hollow heap, a very simple data structure with the same
amortized efficiency as the classical Fibonacci heap. All heap operations
except delete and delete-min take time, worst case as well as amortized;
delete and delete-min take amortized time on a heap of items.
Hollow heaps are by far the simplest structure to achieve this. Hollow heaps
combine two novel ideas: the use of lazy deletion and re-insertion to do
decrease-key operations, and the use of a dag (directed acyclic graph) instead
of a tree or set of trees to represent a heap. Lazy deletion produces hollow
nodes (nodes without items), giving the data structure its name.Comment: 27 pages, 7 figures, preliminary version appeared in ICALP 201
Verification of Costless Merge Pairing Heaps
Most algorithms’ performance is limited by the data structures they use. Internal algorithms then decide the performance of the data structure. This cycle continues until fundamental results, verified by analysis and experiment, prevent further improvement. In this paper I examine one specific example of this. The focus of this work is primarily on a new variant of the pairing heap. I will review the new implementation, compare its theoretical performance, and discuss my original contribution: the first preliminary data on its experimental performance. It is instructive to provide some background information, followed by a formal definition of heaps in 1.1. I also provide a brief overview of existing literature on the design of these data structures in 1.2 and discuss the methods for evaluating these types of structures in 1.3. Full details about the implementation of a pairing heap can be found in 2.2. Ongoing research has produced a variety of different types of heaps, which will be briefly discussed
- …