1,318 research outputs found
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
Amortized Rotation Cost in AVL Trees
An AVL tree is the original type of balanced binary search tree. An insertion
in an -node AVL tree takes at most two rotations, but a deletion in an
-node AVL tree can take . A natural question is whether
deletions can take many rotations not only in the worst case but in the
amortized case as well. A sequence of successive deletions in an -node
tree takes rotations, but what happens when insertions are intermixed
with deletions? Heaupler, Sen, and Tarjan conjectured that alternating
insertions and deletions in an -node AVL tree can cause each deletion to do
rotations, but they provided no construction to justify their
claim. We provide such a construction: we show that, for infinitely many ,
there is a set of {\it expensive} -node AVL trees with the property
that, given any tree in , deleting a certain leaf and then reinserting it
produces a tree in , with the deletion having done
rotations. One can do an arbitrary number of such expensive deletion-insertion
pairs. The difficulty in obtaining such a construction is that in general the
tree produced by an expensive deletion-insertion pair is not the original tree.
Indeed, if the trees in have even height , deletion-insertion
pairs are required to reproduce the original tree
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
Finding Dominators via Disjoint Set Union
The problem of finding dominators in a directed graph has many important
applications, notably in global optimization of computer code. Although linear
and near-linear-time algorithms exist, they use sophisticated data structures.
We develop an algorithm for finding dominators that uses only a "static tree"
disjoint set data structure in addition to simple lists and maps. The algorithm
runs in near-linear or linear time, depending on the implementation of the
disjoint set data structure. We give several versions of the algorithm,
including one that computes loop nesting information (needed in many kinds of
global code optimization) and that can be made self-certifying, so that the
correctness of the computed dominators is very easy to verify
A simple and optimal ancestry labeling scheme for trees
We present a ancestry labeling scheme for trees. The
problem was first presented by Kannan et al. [STOC 88'] along with a simple solution. Motivated by applications to XML files, the label size was
improved incrementally over the course of more than 20 years by a series of
papers. The last, due to Fraigniaud and Korman [STOC 10'], presented an
asymptotically optimal labeling scheme using
non-trivial tree-decomposition techniques. By providing a framework
generalizing interval based labeling schemes, we obtain a simple, yet
asymptotically optimal solution to the problem. Furthermore, our labeling
scheme is attained by a small modification of the original solution.Comment: 12 pages, 1 figure. To appear at ICALP'1
- …
