Splay trees (Sleator and Tarjan) satisfy the so-called access lemma. Many of the nice properties of splay trees follow from it. What makes self-adjusting binary search trees (BSTs) satisfy the access lemma? We propose a global view of BST algorithms, which allows us to identify general structural properties of algorithms that satisfy the access lemma. As an application of our techniques, we present:
(i) Unified and simpler proofs that capture all known BST algorithms satisfying the access lemma including splay trees and their generalization to the class of local algorithms (Subramanian, Georgakopoulos and McClurkin), as well as Greedy BST, introduced by Demaine et al. and shown to satisfy the access lemma by Fox. (ii) A new family of algorithms based on "strict" depth-halving, shown to satisfy the access lemma. (iii) An extremely short proof for the O(log n log log n) amortized access cost for the path-balance heuristic (proposed by Sleator), matching the best known bound (Balasubramanian and Raman) to a lower-order factor.
Key to our results is a geometric view of how BST algorithms rearrange the search path, which reveals the underlying features that make the amortized cost logarithmic w.r.t. the sum-of-logs (SOL) potential. We obtain further structural results from this insight: for instance, we prove that locality is necessary for satisfying the access lemma, as long as the SOL potential is used. We believe that our work makes a step towards a full characterization of efficient self-adjusting BST algorithms, in particular, it shows the limitations of the SOL potential as a tool for analysis.
[1]
Venkatesh Raman,et al.
Path Balance Heuristic for Self-Adjusting Binary Search Trees
,
1995,
FSTTCS.
[2]
J. Ian Munro,et al.
Self-organizing binary search trees
,
1976,
17th Annual Symposium on Foundations of Computer Science (sfcs 1976).
[3]
Robert E. Tarjan,et al.
Self-adjusting binary search trees
,
1985,
JACM.
[4]
George F. Georgakopoulos,et al.
Generalized Template Splay: A Basic Theory and Calculus
,
2004,
Comput. J..
[5]
Kyle Fox,et al.
Upper Bounds for Maximally Greedy Binary Search Trees
,
2011,
WADS.
[6]
Niklaus Wirth,et al.
Algorithms and Data Structures
,
1989,
Lecture Notes in Computer Science.
[7]
Daniel M. Kane,et al.
The geometry of binary search trees
,
2009,
SODA.
[8]
Kurt Mehlhorn,et al.
Review of algorithms and data structures: the basic toolbox by Kurt Mehlhorn and Peter Sanders
,
2011,
SIGA.
[9]
Ashok Subramanian.
An Explanation of Splaying
,
1994,
FSTTCS.