# Splaying Preorders and Postorders

@article{Levy2019SplayingPA, title={Splaying Preorders and Postorders}, author={Caleb C. Levy and Robert Endre Tarjan}, journal={ArXiv}, year={2019}, volume={abs/1907.06309} }

Let $T$ be a binary search tree. We prove two results about the behavior of the Splay algorithm (Sleator and Tarjan 1985). Our first result is that inserting keys into an empty binary search tree via splaying in the order of either $T$'s preorder or $T$'s postorder takes linear time. Our proof uses the fact that preorders and postorders are pattern-avoiding: i.e. they contain no subsequences that are order-isomorphic to $(2,3,1)$ and $(3,1,2)$, respectively. Pattern-avoidance implies certain…

## 4 Citations

### A Foundation for Proving Splay is Dynamically Optimal

- Computer Science
- 2019

It is proved that a lower bound on optimal execution cost is approximately monotone and details how to adapt this proof from the lower bound to Splay, and how to overcome the remaining barriers to establishing dynamic optimality.

### Splay trees on trees

- Computer ScienceSODA
- 2022

It is shown that a $(1 + \frac{1}{t})-approximation of an optimal size-$n STT for a given search distribution can be computed in time, and a broad family of STTs with linear rotation-distance is identified, allowing the generalization of Splay trees to the STT setting.

### New Paths from Splay to Dynamic Optimality

- Computer ScienceArXiv
- 2019

This work attempts to lay the foundations for a proof of the dynamic optimality conjecture, which is that the cost of splaying is always within a constant factor of the optimal algorithm for performing searches.

### Improved Pattern-Avoidance Bounds for Greedy BSTs via Matrix Decomposition

- Computer ScienceArXiv
- 2022

New bounds on the cost of Greedy in the “pattern avoidance” regime are proved and are proved to be within O ( 1 ) factor of the ofﬂine optimal.

## References

SHOWING 1-10 OF 31 REFERENCES

### Sequential access in splay trees takes linear time

- Computer ScienceComb.
- 1985

This paper proves the sequential access theorem, which implies as a special case that accessing the items in a splay tree in sequential order takes linear time, i.e.O(1) time per access.

### Splay Trees

- Computer ScienceHandbook of Data Structures and Applications
- 2004

A splay tree is a binary search tree, where after access to item x the item is made the root of the tree by a splay operation at x, consisting of a sequence of splay steps: If x has no grandparent then rotate(parent(x)).

### On the deque conjecture for the splay algorithm

- Mathematics, Computer ScienceComb.
- 1992

Two new proofs of the Scanning Theorem are proved, one, a simple potential-based proof that solves Tarjan's problem of finding a potential- based proof for the theorem, the other, an inductive proof that generalizes the theorem.

### Self-adjusting binary search trees

- Computer ScienceJACM
- 1985

The splay tree, a self-adjusting form of binary search tree, is developed and analyzed and is found to be as efficient as balanced trees when total running time is the measure of interest.

### Pattern-Avoiding Access in Binary Search Trees

- Computer Science2015 IEEE 56th Annual Symposium on Foundations of Computer Science
- 2015

Two different relaxations of the traversal conjecture for GREEDY are proved: (i) GREEDy is almost linear for preorder traversal, and (ii) if a linear-time preprocessing1 is allowed,GREEDY is in fact linear.

### New Paths from Splay to Dynamic Optimality

- Computer ScienceArXiv
- 2019

This work attempts to lay the foundations for a proof of the dynamic optimality conjecture, which is that the cost of splaying is always within a constant factor of the optimal algorithm for performing searches.

### Binary search trees, rectangles and patterns

- Computer Science
- 2016

Splay, a popular BST algorithm that has several proven efficiency properties, is generalized, and a set of sufficient (and, in a limited sense, necessary) criteria that guarantee the efficient behavior of a BST algorithm is defined.

### Upper Bounds for Maximally Greedy Binary Search Trees

- Computer ScienceWADS
- 2011

The first non-trivial upper bounds for the cost of search operations using GREEDYFUTURE are proved, including giving an access lemma similar to that found in Sleator and Tarjan's classic paper on splay trees.

### Applications of forbidden 0-1 matrices to search tree and path compression-based data structures

- Computer ScienceSODA '10
- 2010

This paper improves, reprove, and simplify several theorems on the performance of data structures based on path compression and search trees, and presents the first asymptotically sharp bound on the length of arbitrary path compressions on arbitrary trees.

### The geometry of binary search trees

- Computer ScienceSODA
- 2009

It is shown that there exists an equal-cost online algorithm, transforming the conjecture of Lucas and Munro into the conjecture that the greedy algorithm is dynamically optimal, and achieving a new lower bound for searching in the BST model.