443 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
Smooth heaps and a dual view of self-adjusting data structures
We present a new connection between self-adjusting binary search trees (BSTs)
and heaps, two fundamental, extensively studied, and practically relevant
families of data structures. Roughly speaking, we map an arbitrary heap
algorithm within a natural model, to a corresponding BST algorithm with the
same cost on a dual sequence of operations (i.e. the same sequence with the
roles of time and key-space switched). This is the first general transformation
between the two families of data structures.
There is a rich theory of dynamic optimality for BSTs (i.e. the theory of
competitiveness between BST algorithms). The lack of an analogous theory for
heaps has been noted in the literature. Through our connection, we transfer all
instance-specific lower bounds known for BSTs to a general model of heaps,
initiating a theory of dynamic optimality for heaps.
On the algorithmic side, we obtain a new, simple and efficient heap
algorithm, which we call the smooth heap. We show the smooth heap to be the
heap-counterpart of Greedy, the BST algorithm with the strongest proven and
conjectured properties from the literature, widely believed to be
instance-optimal. Assuming the optimality of Greedy, the smooth heap is also
optimal within our model of heap algorithms. As corollaries of results known
for Greedy, we obtain instance-specific upper bounds for the smooth heap, with
applications in adaptive sorting.
Intriguingly, the smooth heap, although derived from a non-practical BST
algorithm, is simple and easy to implement (e.g. it stores no auxiliary data
besides the keys and tree pointers). It can be seen as a variation on the
popular pairing heap data structure, extending it with a "power-of-two-choices"
type of heuristic.Comment: Presented at STOC 2018, light revision, additional figure
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
Fast Parallel Algorithms for Basic Problems
Parallel processing is one of the most active research areas these days. We are interested in one aspect of parallel processing, i.e. the design and analysis of parallel algorithms. Here, we focus on non-numerical parallel algorithms for basic combinatorial problems, such as data structures, selection, searching, merging and sorting. The purposes of studying these types of problems are to obtain basic building blocks which will be useful in solving complex problems, and to develop fundamental algorithmic techniques.
In this thesis, we study the following problems: priority queues, multiple search and multiple selection, and reconstruction of a binary tree from its traversals. The research on priority queue was motivated by its various applications. The purpose of studying multiple search and multiple selection is to explore the relationships between four of the most fundamental problems in algorithm design, that is, selection, searching, merging and sorting; while our parallel solutions can be used as subroutines in algorithms for other problems. The research on the last problem, reconstruction of a binary tree from its traversals, was stimulated by a challenge proposed in a recent paper by Berkman et al. ( Highly Parallelizable Problems, STOC 89) to design doubly logarithmic time optimal parallel algorithms because a remarkably small number of such parallel algorithms exist
A pointer-free data structure for merging heaps and min-max heaps
AbstractIn this paper a data structure for the representation of mergeable heaps and min-max heaps without using pointers is introduced. The supported operations are: Insert, DeleteMax, DeleteMin, FindMax, FindMin, Merge, NewHeap, DeleteHeap. The structure is analyzed in terms of amortized time complexity, resulting in a O(1) amortized time for each operation except for Insert, for which a O(lg n) bound holds
Engineering MultiQueues: Fast relaxed concurrent priority queues
Priority queues with parallel access are an attractive data structure for applications like prioritized online scheduling, discrete event simulation, or greedy algorithms. However, a classical priority queue constitutes a severe bottleneck in this context, leading to very small throughput. Hence, there has been significant interest in concurrent priority queues with relaxed semantics. We investigate the complementary quality criteria rank error (how close are deleted elements to the global minimum) and delay (for each element x, how many elements with lower priority are deleted before x). In this paper, we introduce MultiQueues as a natural approach to relaxed priority queues based on multiple sequential priority queues. Their naturally high theoretical scalability is further enhanced by using three orthogonal ways of batching operations on the sequential queues. Experiments indicate that MultiQueues present a very good performance-quality tradeoff and considerably outperform competing approaches in at least one of these aspects.
We employ a seemingly paradoxical technique of "wait-free locking" that might be of more general interest to convert sequential data structures to relaxed concurrent data structures
Soft Sequence Heaps
Chazelle [JACM00] introduced the soft heap as a building block for efficient
minimum spanning tree algorithms, and recently Kaplan et al. [SOSA2019] showed
how soft heaps can be applied to achieve simpler algorithms for various
selection problems. A soft heap trades-off accuracy for efficiency, by allowing
of the items in a heap to be corrupted after a total of
insertions, where a corrupted item is an item with artificially increased key
and is a fixed error parameter. Chazelle's soft heaps
are based on binomial trees and support insertions in amortized
time and extract-min operations in amortized time.
In this paper we explore the design space of soft heaps. The main
contribution of this paper is an alternative soft heap implementation based on
merging sorted sequences, with time bounds matching those of Chazelle's soft
heaps. We also discuss a variation of the soft heap by Kaplan et al.
[SICOMP2013], where we avoid performing insertions lazily. It is based on
ternary trees instead of binary trees and matches the time bounds of Kaplan et
al., i.e. amortized insertions and amortized
extract-min. Both our data structures only introduce corruptions after
extract-min operations which return the set of items corrupted by the
operation.Comment: 16 pages, 3 figure
- …