865 research outputs found
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
Why some heaps support constant-amortized-time decrease-key operations, and others do not
A lower bound is presented which shows that a class of heap algorithms in the
pointer model with only heap pointers must spend Omega(log log n / log log log
n) amortized time on the decrease-key operation (given O(log n) amortized-time
extract-min). Intuitively, this bound shows the key to having O(1)-time
decrease-key is the ability to sort O(log n) items in O(log n) time; Fibonacci
heaps [M.L. Fredman and R. E. Tarjan. J. ACM 34(3):596-615 (1987)] do this
through the use of bucket sort. Our lower bound also holds no matter how much
data is augmented; this is in contrast to the lower bound of Fredman [J. ACM
46(4):473-501 (1999)] who showed a tradeoff between the number of augmented
bits and the amortized cost of decrease-key. A new heap data structure, the
sort heap, is presented. This heap is a simplification of the heap of Elmasry
[SODA 2009: 471-476] and shares with it a O(log log n) amortized-time
decrease-key, but with a straightforward implementation such that our lower
bound holds. Thus a natural model is presented for a pointer-based heap such
that the amortized runtime of a self-adjusting structure and amortized lower
asymptotic bounds for decrease-key differ by but a O(log log log n) factor
- …