Splaying Preorders and Postorders

07/15/2019
by   Caleb C. Levy, et al.
0

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 constraints on the manner in which items are inserted. We exploit this structure with a simple potential function that counts inserted nodes lying on access paths to uninserted nodes. Our methods can likely be extended to permutations that avoid more general patterns. Second, if T' is any other binary search tree with the same keys as T and T is weight-balanced (Nievergelt and Reingold 1973), then splaying T's preorder sequence or T's postorder sequence starting from T' takes linear time. To prove this, we demonstrate that preorders and postorders of balanced search trees do not contain many large "jumps" in symmetric order, and exploit this fact by using the dynamic finger theorem (Cole et al. 2000). Both of our results provide further evidence in favor of the elusive "dynamic optimality conjecture."

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/03/2018

Weighted dynamic finger in binary search trees

It is shown that the online binary search tree data structure GreedyASS ...
research
08/01/2019

Dynamic Optimality Refuted -- For Tournament Heaps

We prove a separation between offline and online algorithms for finger-b...
research
07/15/2019

New Paths from Splay to Dynamic Optimality

Consider the task of performing a sequence of searches in a binary searc...
research
11/21/2017

The Hidden Binary Search Tree:A Balanced Rotation-Free Search Tree in the AVL RAM Model

In this paper we generalize the definition of "Search Trees" (ST) to ena...
research
12/05/2019

Settling the relationship between Wilber's bounds for dynamic optimality

In FOCS 1986, Wilber proposed two combinatorial lower bounds on the oper...
research
06/22/2018

Improved bounds for multipass pairing heaps and path-balanced binary search trees

We revisit multipass pairing heaps and path-balanced binary search trees...
research
12/26/2020

Arithmetic Binary Search Trees: Static Optimality in the Matching Model

Motivated by recent developments in optical switching and reconfigurable...

Please sign up or login with your details

Forgot password? Click here to reset