# Optimality of Splay Trees in Data Structure

Data Structure AlgorithmsAnalysis of AlgorithmsAlgorithms

#### Big Data Hadoop

Best Seller

89 Lectures 11.5 hours

#### Practical Data Science using Python

22 Lectures 6 hours

#### Data Science and Data Analysis with Python

50 Lectures 3.5 hours

## Dynamic optimality conjecture

In 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 so many corollaries of the dynamic optimality conjecture that remain unproven

Traversal Conjectureet same elements are contained by two splay trees t1 and t2. The sequence obtained by visiting the elements in t2 in preorder (i.e., depth first search order) be assumed as s. Entire cost of performing the sequence s of accesses on t1 is O(n).

Deque Conjectureet a sequence s of p double-ended queue operations (push, pop, inject, eject) is defined. Then the cost of performing s sequence on a splay tree is O(p+n).

Split Conjectureet s be any permutation of the elements of the splay tree. Then the cost for the deletion the elements in the order s is O(n).