7 research outputs found

    Top-Down Skiplists

    Full text link
    We describe todolists (top-down skiplists), a variant of skiplists (Pugh 1990) that can execute searches using at most log⁥2−Δn+O(1)\log_{2-\varepsilon} n + O(1) binary comparisons per search and that have amortized update time O(Δ−1log⁥n)O(\varepsilon^{-1}\log n). A variant of todolists, called working-todolists, can execute a search for any element xx using log⁥2−Δw(x)+o(log⁥w(x))\log_{2-\varepsilon} w(x) + o(\log w(x)) binary comparisons and have amortized search time O(Δ−1log⁥w(w))O(\varepsilon^{-1}\log w(w)). Here, w(x)w(x) is the "working-set number" of xx. No previous data structure is known to achieve a bound better than 4log⁥2w(x)4\log_2 w(x) comparisons. We show through experiments that, if implemented carefully, todolists are comparable to other common dictionary implementations in terms of insertion times and outperform them in terms of search times.Comment: 18 pages, 5 figure

    On Optimal Balance in B-Trees: What Does It Cost to Stay in Perfect Shape?

    Get PDF
    Any B-tree has height at least ceil[log_B(n)]. Static B-trees achieving this height are easy to build. In the dynamic case, however, standard B-tree rebalancing algorithms only maintain a height within a constant factor of this optimum. We investigate exactly how close to ceil[log_B(n)] the height of dynamic B-trees can be maintained as a function of the rebalancing cost. In this paper, we prove a lower bound on the cost of maintaining optimal height ceil[log_B(n)], which shows that this cost must increase from Omega(1/B) to Omega(n/B) rebalancing per update as n grows from one power of B to the next. We also provide an almost matching upper bound, demonstrating this lower bound to be essentially tight. We then give a variant upper bound which can maintain near-optimal height at low cost. As two special cases, we can maintain optimal height for all but a vanishing fraction of values of n using Theta(log_B(n)) amortized rebalancing cost per update and we can maintain a height of optimal plus one using O(1/B) amortized rebalancing cost per update. More generally, for any rebalancing budget, we can maintain (as n grows from one power of B to the next) optimal height essentially up to the point where the lower bound requires the budget to be exceeded, after which optimal height plus one is maintained. Finally, we prove that this balancing scheme gives B-trees with very good storage utilization

    The Complexity of Constructing Evolutionary Trees Using Experiments

    Full text link

    New Combinatorial Properties and Algorithms for AVL Trees

    Get PDF
    In this thesis, new properties of AVL trees and a new partitioning of binary search trees named core partitioning scheme are discussed, this scheme is applied to three binary search trees namely AVL trees, weight-balanced trees, and plain binary search trees. We introduce the core partitioning scheme, which maintains a balanced search tree as a dynamic collection of complete balanced binary trees called cores. Using this technique we achieve the same theoretical efficiency of modern cache-oblivious data structures by using classic data structures such as weight-balanced trees or height balanced trees (e.g. AVL trees). We preserve the original topology and algorithms of the given balanced search tree using a simple post-processing with guaranteed performance to completely rebuild the changed cores (possibly all of them) after each update. Using our core partitioning scheme, we simultaneously achieve good memory allocation, space-efficient representation, and cache-obliviousness. We also apply this scheme to arbitrary binary search trees which can be unbalanced and we produce a new data structure, called Cache-Oblivious General Balanced Tree (COG-tree). Using our scheme, searching a key requires O(log_B n) block transfers and O(log n) comparisons in the external-memory and in the cache-oblivious model. These complexities are theoretically efficient. Interestingly, the core partition for weight-balanced trees and COG-tree can be maintained with amortized O(log_B n) block transfers per update, whereas maintaining the core partition for AVL trees requires more than a poly-logarithmic amortized cost. Studying the properties of these trees also lead us to some other new properties of AVL trees and trees with bounded degree, namely, we present and study gaps in AVL trees and we prove Tarjan et al.'s conjecture on the number of rotations in a sequence of deletions and insertions

    Algorithmen fĂŒr Packprobleme

    Get PDF
    Packing problems belong to the most frequently studied problems in combinatorial optimization. Mainly, the task is to pack a set of small objects into a large container. These kinds of problems, though easy to state, are usually hard to solve. An additional challenge arises, if the set of objects is not completely known beforehand, meaning that an object has to be packed before the next one becomes available. These problems are called online problems. If the set of objects is completely known, they are called offline problems. In this work, we study two online and one offline packing problem. We present algorithms that either compute an optimal or a provably good solution: Maintaining Arrays of Contiguous Objects. The problem of maintaining a set of contiguous objects (blocks) inside an array is closely related to storage allocation. Blocks are inserted into the array, stay there for some (unknown) duration, and are then removed from the array. After inserting a block, the next block becomes available. Blocks can be moved inside the array to create free space for further insertions. Our goals are to minimize the time until the last block is removed from the array (the makespan) and the costs for the block moves. We present inapproximability results, an algorithm that achieves an optimal makespan, an algorithm that uses only O(1) block moves per insertion and deletion, and provide computational experiments. Online Square Packing. In the classical online strip packing problem, one has to find a non-overlapping placement for a set of objects (squares in our setting) inside a semi-infinite strip, minimizing the height of the occupied area. We study this problem under two additional constraints: Each square has to be packed on top of another square or on the bottom of the strip. Moreover, there has to be a collision-free path from the top of the strip to the square's final position. We present two algorithms that achieve asymptotic competitive factors of 3.5 and 2.6154, respectively. Point Sets with Minimum Average Distance. A grid point is a point in the plane with integer coordinates. We present an algorithm that selects a set of grid points (town) such that the average L1 distance between all pairs of points is minimized. Moreover, we consider the problem of choosing point sets (cities) inside a given square such that-again-the interior distances are minimized. We present a 5.3827-approximation algorithm for this problem.Packprobleme gehören zu den am hĂ€ufigsten untersuchten Problemen in der kombinatorischen Optimierung. GrundsĂ€tzlich besteht die Aufgabe darin, eine Menge von kleinen Objekten in einen grĂ¶ĂŸeren Container zu packen. Probleme dieser Art können meistens nur mit hohem Aufwand gelöst werden. ZusĂ€tzliche Schwierigkeiten treten auf, wenn die Menge der zu packenden Objekte zu Beginn nicht vollstĂ€ndig bekannt ist, d.h. dass das nĂ€chste Objekt erst verfĂŒgbar wird, wenn das vorherige gepackt ist. Solche Probleme werden online Probleme genannt. Wenn alle Objekte bekannt sind, spricht man von einem offline Problem. In dieser Arbeit stellen wir zwei online Packprobleme und ein offline Packproblem vor und entwickeln Algorithmen, die die Probleme entweder optimal oder aber mit einer beweisbaren GĂŒte lösen: Verwaltung von kontinuierlichen Objekten. Das Problem eine Menge von kontinuierlichen Objekten (Blöcke) in einem Array möglichst gut zu verwalten, ist eng verwandt mit Problemen der Speicherverwaltung. Blöcke werden in einen kontinuierlichen Bereich des Arrays eingefĂŒgt und nach einer (unbekannten) Dauer wieder entfernt. Dabei ist immer nur der nĂ€chste einzufĂŒgende Block bekannt. Um Freiraum fĂŒr weitere Blöcke zu schaffen, dĂŒrfen Blöcke innerhalb des Arrays verschoben werden. Ziel ist es, die Zeit bis der letzte Block entfernt wird (Makespan) und die Kosten fĂŒr die Verschiebe-Operationen zu minimieren. Wir geben eine komplexitĂ€tstheoretische Einordnung dieses Problems, stellen einen Algorithmus vor, der einen optimalen Makespan bestimmt, einen der O(1) Verschiebe-Operationen benötigt und evaluieren verschiedene Algorithmen experimentell. Online-Strip-Packing. Im klassischen Online-Strip-Packing-Problem wird eine Menge von Objekten (hier: Quadrate) in einen Streifen (unendlicher Höhe) platziert, so dass die Höhe der benutzten FlĂ€che möglichst gering ist. Wir betrachten einen Spezialfall, bei dem zwei zusĂ€tzliche Bedingungen gelten: Quadrate mĂŒssen auf anderen Quadraten oder auf dem Boden des Streifens platziert werden und die endgĂŒltige Position muss auf einem kollisionfreien Weg erreichbar sein. Es werden zwei Algorithmen mit GĂŒten von 3,5 bzw. 2,6154 vorgestellt. Punktmengen mit minimalem Durchschnittsabstand. Ein Gitterpunkt ist ein Punkt in der Ebene mit ganzzahligen Koordinaten. Wir stellen einen Algorithmus vor, der eine Anzahl von Punkten aus der Menge aller Gitterpunkte auswĂ€hlt, so dass deren durchschnittlicher L1-Abstand minimal ist. Außerdem betrachten wir das Problem, mehrere Punktmengen mit minimalem Durchschnittsabstand innerhalb eines gegebenen Quadrates auszuwĂ€hlen. Wir stellen einen 5,3827-Approximationsalgorithmus fĂŒr dieses Problem vor

    Fast updating of well-balanced trees

    No full text
    corecore