127 research outputs found

    Hollow Heaps

    Full text link
    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 O(1)O(1) time, worst case as well as amortized; delete and delete-min take O(logn)O(\log n) amortized time on a heap of nn 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

    A Faster Deterministic Exponential Time Algorithm for Energy Games and Mean Payoff Games

    Get PDF
    We present an improved exponential time algorithm for Energy Games, and hence also for Mean Payoff Games. The running time of the new algorithm is O (min(m n W, m n 2^{n/2} log W)), where n is the number of vertices, m is the number of edges, and when the edge weights are integers of absolute value at most W. For small values of W, the algorithm matches the performance of the pseudopolynomial time algorithm of Brim et al. on which it is based. For W >= n2^{n/2}, the new algorithm is faster than the algorithm of Brim et al. and is currently the fastest deterministic algorithm for Energy Games and Mean Payoff Games. The new algorithm is obtained by introducing a technique of forecasting repetitive actions performed by the algorithm of Brim et al., along with the use of an edge-weight scaling technique

    How to Find a Point in the Convex Hull Privately

    Get PDF
    We study the question of how to compute a point in the convex hull of an input set SS of nn points in Rd{\mathbb R}^d in a differentially private manner. This question, which is trivial non-privately, turns out to be quite deep when imposing differential privacy. In particular, it is known that the input points must reside on a fixed finite subset GRdG\subseteq{\mathbb R}^d, and furthermore, the size of SS must grow with the size of GG. Previous works focused on understanding how nn needs to grow with G|G|, and showed that n=O(d2.58logG)n=O\left(d^{2.5}\cdot8^{\log^*|G|}\right) suffices (so nn does not have to grow significantly with G|G|). However, the available constructions exhibit running time at least Gd2|G|^{d^2}, where typically G=Xd|G|=X^d for some (large) discretization parameter XX, so the running time is in fact Ω(Xd3)\Omega(X^{d^3}). In this paper we give a differentially private algorithm that runs in O(nd)O(n^d) time, assuming that n=Ω(d4logX)n=\Omega(d^4\log X). To get this result we study and exploit some structural properties of the Tukey levels (the regions DkD_{\ge k} consisting of points whose Tukey depth is at least kk, for k=0,1,...k=0,1,...). In particular, we derive lower bounds on their volumes for point sets SS in general position, and develop a rather subtle mechanism for handling point sets SS in degenerate position (where the deep Tukey regions have zero volume). A naive approach to the construction of the Tukey regions requires nO(d2)n^{O(d^2)} time. To reduce the cost to O(nd)O(n^d), we use an approximation scheme for estimating the volumes of the Tukey regions (within their affine spans in case of degeneracy), and for sampling a point from such a region, a scheme that is based on the volume estimation framework of Lov\'asz and Vempala (FOCS 2003) and of Cousins and Vempala (STOC 2015). Making this framework differentially private raises a set of technical challenges that we address

    Pairing heaps: the forward variant

    Get PDF
    The pairing heap is a classical heap data structure introduced in 1986 by Fredman, Sedgewick, Sleator, and Tarjan. It is remarkable both for its simplicity and for its excellent performance in practice. The "magic" of pairing heaps lies in the restructuring that happens after the deletion of the smallest item. The resulting collection of trees is consolidated in two rounds: a left-to-right pairing round, followed by a right-to-left accumulation round. Fredman et al. showed, via an elegant correspondence to splay trees, that in a pairing heap of size n all heap operations take O(log n) amortized time. They also proposed an arguably more natural variant, where both pairing and accumulation are performed in a combined left-to-right round (called the forward variant of pairing heaps). The analogy to splaying breaks down in this case, and the analysis of the forward variant was left open. In this paper we show that inserting an item and deleting the minimum in a forward-variant pairing heap both take amortized time O(log(n) * 4^(sqrt(log n))). This is the first improvement over the O(sqrt(n)) bound showed by Fredman et al. three decades ago. Our analysis relies on a new potential function that tracks parent-child rank-differences in the heap

    Selection from Heaps, Row-Sorted Matrices, and X+Y Using Soft Heaps

    Get PDF
    We use soft heaps to obtain simpler optimal algorithms for selecting the k-th smallest item, and the set of k smallest items, from a heap-ordered tree, from a collection of sorted lists, and from X+Y, where X and Y are two unsorted sets. Our results match, and in some ways extend and improve, classical results of Frederickson (1993) and Frederickson and Johnson (1982). In particular, for selecting the k-th smallest item, or the set of k smallest items, from a collection of m sorted lists we obtain a new optimal "output-sensitive" algorithm that performs only O(m + sum_{i=1}^m log(k_i+1)) comparisons, where k_i is the number of items of the i-th list that belong to the overall set of k smallest items
    corecore