Concurrent Search and Insertion in K-Dimensional Height Balanced Trees
نویسندگان
چکیده
K-Dimensional Height Balanced Trees represent one solution to handle simultaneous tree operations (insertion, search) with multiple value keys in an efficient way. The current paper focuses on discussing some of the intricacies and overhead caused by the concurrency aspects, as well as providing an implementation of the algorithm, together with a discussion regarding its correctness. 1. Context / Related work A fairly common way to organize information is in a hierarchical order. Trees, as a data structure, are a special kind of graph: a connected a-cyclic one. In order to efficiently perform operations on such a data structure (i.e. search, sort, insert, delete), the idea of binary search trees seemed as a valid option. Certain concerns related to the tree operations time complexity pioneered solutions like AVL-Trees, Red-Black Trees (a special type of AVL trees), B-Trees, in the attempt to optimize the time complexity of the tree operations. Multiple dimension height balanced trees are a more generalized type of AVL-tree. In such a data structure, all the basic tree operations (insertions, deletions, searches) can be performed in at most O(log n) time. K-Dimensional Height Balanced Trees take AVL-trees to multiple dimensions. In this case, the data structure is defined such that all the operations are performed in at most O(log n)+k time. After each operation that alters the structure of the data, rebalancing has to be performed, in order to maintain the original height balancing condition. Such a data structure is specially used in dynamic databases, as well as in application that perform information storage and retrieval. 2. Overview of contents In the current paper I will give a brief overview of the originally proposed algorithm [1], discuss about the changes required due to a concurrent approach [2], as well as provide some of the details and design decisions regarding my implementation. I want to mention that, as far as the novelty of this paper goes, the following can be mentioned: the class design and decisions of the java implementation, the attempt to verify the implementation of the algorithm using some existent software tools, as well as extending the object model in order to better support thorough testing. For the ones interested in the mathematical details, I suggest reading the original papers that I base my implementation on.
منابع مشابه
A Unified Approach to Concurrent and Parallel Algorithms on Balanced Data Structures (Invited Paper)
Concurrent and parallel algorithms are different. However, in the case of dictionaries, both kinds of algorithms share many common points. We present a unified approach emphasizing these points. It is based on a careful analysis of the sequential algorithm, extracting from it the more basic facts, encapsulated later on as local rules. We apply the method to the insertion algorithms in AVL trees...
متن کامل0 Rank - Balanced Trees
Since the invention of AVL trees in 1962, many kinds of binary search trees have been proposed. Notable are red-black trees, in which bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and O(1) rotations worst-case. But the design space of balanced trees has not been fully explored. We continue the exploration. Our contributions are three. We systematically study the...
متن کاملMultidimensional Balanced Binary Trees
A bstract-A new balanced multidimensional tree structure called a k-dimensional balanced binary tree, k a positive integer, is presented and investigated. It is shown that the data structure can be used to manage a set of n k-dimensional data items such that access, insertion, and deletion operations can be supported in Ooog n + k) time. The data structure is a multidimensional generalization o...
متن کاملOn k-Dimensional Balanced Binary Trees
An amortized analysis of the insertion and deletion algorithms of k-dimensional balanced binary trees (kBB-trees) is performed. It is shown that the total rebalancing time for a mixed sequence of m insertions and deletions in a kBB-tree of size n is O(k(m+n)). Based on 2BB-trees, a self-organizing tree, called a self-organizing balanced binary tree, is defined. It is shown that the average acce...
متن کاملA New Class of Balanced Search Trees: Half Balanced Binary Search Trees
— A newclassojbalancedbinary search trees is introduced: thehalf-balancedbinary trees. When used as a node search tree, a hal]-balanced binary tree containing n keys has a height at most 2 lg(n + 2) —2. Algorithms are given for IN SERT and DELETE instructions, having time complexity O(lg n). A remarkable resuit is that at most one local restructuring must be performed during the (leletion or th...
متن کامل