We introduce a new technique to bound the asymptotic performance of splay trees. The basic idea is to transcribe, in an indirect fashion, the rotations performed by the splay tree as a Davenport-Schinzel sequence S, none of whose subsequences are isomorphic to fixed forbidden subsequence. We direct this technique towards Tarjan's deque conjecture and prove that n deque operations require O(n alpha^*(n)) time, where alpha^*(n) is the minimum number of applications of the inverse-Ackermann function mapping n to a constant. We are optimistic that this approach could be directed towards other open conjectures on splay trees such as the traversal and split conjectures.
Sleator and Tarjan proposed the splay tree [28] as a self-adjusting alternative to traditional search trees like red-black trees and AVL-trees. Rather than enforce some type of balance invariant, the splay tree simply adjusts its structure in response to the access pattern by rotating accessed elements towards the root in a prescribed way; see Figure 1. By letting the access pattern influence its own shape, the splay tree can inadvertently learn to perform optimally on a variety of access patterns. For example, the static optimality theorem states that splay trees are no worse than any fixed search tree. The working set, and dynamic finger theorems show that the access time is logarithmic in the distance to the accessed element, where distance is either temporal (working set [28]) or with respect to key-space (dynamic finger [8,7]). Sleator and Tarjan went a step further and conjectured that splay trees are, to within a constant factor, just as efficient as any dynamic binary search tree, even one that knows the whole access sequence in advance. Despite a fair amount of attention over the years, this dynamic optimality conjecture is still open. In fact, there is currently no non-trivial (i.e., sub-logarithmic) bound on the competitiveness of splay trees. The difficulty of this problem stems from the fact that splay trees were deliberately designed not to "play along." They do not adhere to any notion of good structure that we might have and, more to the point, there is no reason to believe that splay trees mimic the behavior of the optimal dynamic search tree. After accessing an element x the tree rotates it to the root position by repeatedly applying a zig-zig, zig-zag, or zig as appropriate. On the left is the zig-zig case: x and its parent y are both left children (or both right children); the edges (y, z) and (x, y) are rotated in that order. On the right is the zig-zag case; the edges (x, y) and (x, z) are rotated in that order. Not depicted is the zig case, when y is the tree root and the edge (x, y) is rotated.
The renewed interest in the dynamic optimality question is largely due to Demaine et al.’s invention of tango trees [9]. By appealing to the interleave lower bound of Wilbur [34] they show that tango trees are O(log log n)-competitive. Tango trees make use of red-black trees but it is easy to see that just about any standard binary search tree could be used as a black box in its place. Wang et al. [33] (see also [14]) showed that if splay trees are employed instead of red-black trees it is possible to have O(log log n)-competitiveness and retain some properties of splay trees, such as O(log n) amortized time per access and sequential access in linear time. Wang et al. also extended their data structure to handle insertions and deletions.
If one’s immediate goal is to prove that splay trees are simply o(log n)-competitive, it suffices to show that they run in o(n log n) time on any class of access sequences for which the optimal binary search tree runs in O(n) time. There is currently no “theory” of access sequences whose inherent complexity is linear. It is, therefore, not too surprising that all the major open conjectures on splay trees (corollaries of dynamic optimality) concern sequences whose optimal complexity is linear. Whether one’s goal is modest or ambitious, i.e., proving sub-logarithmic competitiveness or the full dynamic optimality conjecture, the first step must be to understand how splay trees behave on very easy access sequences. We restate below three unresolved conjectures on the optimality of splay trees [32,28,25].
Deque Conjecture Tarjan [32] conjectured that all double-ended queue operations1 (push, pop, and their symmetric counterparts inject and eject) take O(1) amortized time if implemented with a splay tree.
A push makes the root of the splay tree the right child of a new vertex and a pop splays the leftmost leaf to the root position and deletes it. Inject and eject are symmetric.
Traversal Conjecture Sleator and Tarjan [28] conjectured that for two binary search trees S and T (defined on the same node set) accessing the elements in T by their preorder number in S takes linear time.
Split Conjecture Lucas conjectured [25] that any sequence of splittings in a splay tree takes linear time.
A split at x consists of splaying x to the root and deleting it, leaving two splay trees, each subject to more splittings.
Sundar [30] established a bound of O(nα(n)) on the time required to perform n deque operations, where α is the inverse-Ackermann function. Lucas [25] showed that when the initial splay tree is a path (each node a left child), n split operations take O(nα(n)) time. Notice that the split conjecture subsumes a special case of the deque conjecture, where only pops and ejects are allowed. We are aware of no published work concerning the traversal conjecture.
Our Contributions. We introduce a new technique in the analysis of splay trees that is fundamentally dif
This content is AI-processed based on open access ArXiv data.