Found 210 Articles for Analysis of Algorithms

Splay in Virtual Tree in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 12:18:21

121 Views

In virtual tree, some edges are treated as solid and some are treated as dashed. Usual splaying is performed only in the solid trees. To splay at a node y in the virtual tree, following method is implemented.The algorithm looks at the tree three times, once in each pass, and changes it. In first pass, by splaying only in the solidtrees, beginning from the node y, the path from y to the root of the overall tree, becomes dashed. This path is createdsolid by splicing. A final splay at node y will now create y the root of the tree. ... Read More

Solid Trees in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 12:12:53

259 Views

For the given forest, we create some of the given edges “dashed” and the rest of them are kept solid. Each non-leaf node is associated with only one “solid” edge to one of its children. All other children will be connected with the help of a dashed edge.To be more concrete, in any given tree, the right-most link (to its child) should be kept solid, and all other links to its other children are created “dashed”.As a result, the tree will be broken into a collection of solid paths. The roots of solid paths will be joined to some other ... Read More

Static Finger Theorem in Data Structure

Arnab Chakraborty
Updated on 13-Jul-2020 09:16:10

125 Views

STATIC FINGER THEOREM − Let f is treated as a specific element called the finger.Then the below expression is a bound on the cost of splaying a sequenceO(m + n log(n) + Σ Sum log (|f - i[j]| + 1))jNOTE − |f-i| is denoted as the distance in the symmetric ordering of the items between the finger and item i.Where m is denoted as number of update or access operations on a tree having at most n nodes.Observe that, at least in amortized sense, the time taken for first m operations on a tree that never exceeds more than n ... Read More

Optimality of Splay Trees in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 12:05:50

76 Views

Dynamic optimality conjectureIn addition to the proven performance guarantees for splay trees there is an unproven conjecture with great interest. Dynamic optimality conjecture denotes this conjecture. Let any binary search tree algorithm such as B accesses an element y by traversing the path from the root to y at a cost of d(y)+1, and that between accesses can make any rotations in the tree at a cost of 1 per rotation. Let B(s) be the cost for B to perform the sequence s of accesses. Then the cost for a splay tree to perform the same accesses is O[n+B(s)].There are ... Read More

Adaptive Merging and Sorting in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 12:01:27

535 Views

ADAPTIVE MERGE SORTAdaptive Merge Sort performs the merging of sorted sub-list merge sort does. However, the size of initial sub-list is depended upon the existence of ordering among the list of elements rather than having sub-list of size 1. For example, consider list in the figure.It consists of 2 sorted sub-lists.sub-list 1 with elements 16, 15, 14, 13.sub-list 2 with elements 9, 10, 11, 12.The sub-list 1 is sorted but in reverse order. Thus, the sub-list 1 is reversed as shown in the figure.Once the sub-lists are found merging process starts. Adaptive merge sort starts merging the sub-lists. Adaptive merge ... Read More

Skip Lists in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 11:53:27

394 Views

In a skip list, one can finger search for element a from a node containing the element b by simply continuing the search from this point a.Note that if a < b, then search proceeds at backward direction, and if a > b, then search proceeds at forward direction.The backwards case is symmetric to normal search in a skip list, but the forward case is actually more complicated.Normally, search in a skip list is expected to be fast because the sentinel at the start of the list is considered as the tallest node.However, our finger could be associated with a ... Read More

Randomized Finger Search Trees in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 11:51:31

116 Views

Two randomized alternatives to deterministic search trees are the randomized binary search trees, treaps and the skip lists. Both treaps and skip lists are defined as elegant data structures, where the randomization facilitates simple and efficient update operations.In this section we explain how both treaps and skip lists can be implemented as efficient finger search trees without changing the data structures. Both data structures support finger searches by consuming expected O(log d) time, where the expectations are taken over the random choices created by the algorithm during the construction of the data structure.Skip listsIn a skip list, one can finger ... Read More

Level Linked (2,4)-Trees in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 11:35:38

433 Views

In this section we explain how (2, 4)-trees can support efficient finger searches by the introduction of level links. The ideas explained in this section also implements to the more general class of height-balanced trees denoted (a, b)-trees, for b ≥ 2a.A (2, 4)-tree is defined as a height-balanced search tree where all leaves have the same depth and all internal nodes have degree two, three or four. Elements are stored at the leaves, and internal nodes only store search keys to guide searches. Since each internal node has degree at least two, it follows that a (2, 4)-tree has ... Read More

Dynamic Finger Search Trees in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 11:29:21

256 Views

A dynamic finger search data structure should in addition to finger searches also perform the insertion and deletion of elements at a position given by a finger.Finger search trees is defined as a variant of B-trees supporting finger searches in O(log d) time and updates in O(1) time, assuming that only O(1) moveable fingers are maintained.Traversing a finger d positions requires O(log d) time.The finger search trees (that means AVL-trees, red-black trees) constructions either consider a fixed constant number of fingers or only support updates in amortized constant time.Constructions supporting an arbitrary number of fingers and with worst case update ... Read More

Finger Searching in Data Structure

Arnab Chakraborty
Updated on 07-Jan-2020 09:42:30

261 Views

A finger search on a data structure is defined as an extension of any search operation that structure supports, where a reference (finger) to an element in the data structure is given along with the query. While the search time for an element is most frequently denoted as a function of the number of elements in a data structure, finger search times are treated as a function of the distance between the element and the finger.In a set of m elements, the distance d(a, b) between two elements a and b is their difference in rank. If elements a and ... Read More

Advertisements