Part IIBounds
Part I fixed what a BST execution is and what it costs. Part II asks how much a request sequence must or may cost, independently of any algorithm. Two kinds of statements live here. Upper-bound benchmarks are explicit functions of the sequence, such as the entropy of its access frequencies, that a good algorithm should match. Lower bounds hold for every execution, hence for the offline optimum. Algorithms enter only in Part III and Part IV, where each is measured against both.
- Chapter 14 defines the classical benchmarks of the splay-tree literature: the working set, static optimality, the static and dynamic finger sums, the unified charge, and comparison with a fixed tree. It proves the implications between them, and the entropy bounds that make “static optimality” mean what its name says.
- Chapter 15 studies a static tree searched with a lazy finger, where each search starts where the previous one ended, and proves that the best such tree costs, up to constant factors, the best weighted dynamic finger bound.
- Chapter 16 places the lazy finger between static trees searched from the root and dynamic BSTs, with unbounded gaps on both sides.
- Chapter 17 proves Wilber’s interleave lower bound, which holds for every execution in the rotation, pointer and geometric models. It is the tool behind the -competitive Tango trees.
- Chapter 18 shows that the conditional entropy of the requests is not a benchmark any BST can meet, through Wilber’s bound on a bit-reversal sequence.
A map of the bounds
Two figures collect the relations between them: the first up to constant factors, with the algorithms that meet each bound, and the second with the constants the library proves. Each benchmark is a function of the request sequence of length on keys:
- , Wilber’s interleave quantity for a reference tree,
Wilber.interleave(Chapter 17); - , the least cost of an
Executionserving , the offline optimum of Chapter 5 (the pointer-machine optimum is the same up to constant factors, by Chapter 12); - , the conditional-entropy benchmark
ConditionalEntropy.cost(Chapter 18); - , the cost of the best static tree searched with a lazy finger,
LazyFinger.optimalCost(Chapter 15); - , the best weighted dynamic finger bound,
WeightedFinger.optimalCostFrom(Chapter 15); - , the cost of the best static tree searched from the root, the minimum of
StaticTree.costover trees; - , the entropy bound
Bounds.staticCost; , the working-set sumworkingSetSum; , the static finger sumBounds.fingerCost; and , the dynamic finger sumBounds.dynamicFingerCostFrom; - ,
Bounds.logCost, what a balanced tree pays, about per request whatever the sequence. It is the baseline of the classical trees of Part III.
Up to constants
The first figure ignores constant factors and startup terms. An arrow means that a cost bound implies a cost bound . For most arrows this is an inequality between the benchmarks themselves; the arrows out of and are instead implications between properties of algorithms, with the startup allowance of Chapter 14. “Strict” marks an arrow whose converse fails: the gap is unbounded on some family of sequences. Bounds within constant factors of each other share a box: (Chapter 15) and (the entropy bounds of Section 14.3).
The bubbles are algorithms. An arrow from an algorithm to a bound means that the algorithm’s cost is within that ratio of the bound, and so of every bound below it; the ratio is written when it is not constant. Dashed grey arrows are results that are not formalized yet. They are listed in the library’s roadmap, for a later round of proofs.
| Algorithm | Meets | What is proved | Lean |
|---|---|---|---|
| Tango trees (Section 26.2) | , ratio | An online BST algorithm whose total cost is at most times that of any offline execution from the same tree, plus . | exists_competitive |
| Splay trees (Section 24.2) | At most rotations, from every initial tree. | Splay.workingSet |
|
| Splay trees | , ratio | Proved by Chmel et al. (2026), a 2026 preprint. | not formalized yet |
| GreedyASS (Section 25.3) | Some online BST algorithm costs at most , and at most from every start key. | GreedyASS bst |
|
| Combined BST (Chapter 31) | , ratio , and | One causal program, chosen before the requests: GreedyASS and Tango with linear startup, combined by ComboBST and deamortized. Its cost is for every offline execution with rotations, and each request costs less than . | combined |
| Optimal lazy-finger tree (Chapter 27) | A dynamic program builds a static tree whose lazy-finger cost is exactly . It reads the whole sequence first. | root_start |
|
| Entropy tree (Chapter 19) | , hence within a factor 3 | A static tree with the weighted median at every root costs at most . It is built from the access frequencies. | entropy_upper_bound |
| Optimal static tree (Chapter 19) | The recurrence builds a static tree of cost exactly , and Knuth’s algorithm computes this cost examining at most candidate roots. Both read the whole sequence first. | optTree_static, optCost_le_static, knuth_optCost |
|
| Balanced static tree (Chapter 19) | The balanced static tree costs at most on every sequence. The dynamic trees of Part III have logarithmic height under updates; their search cost against this baseline is not stated as a theorem. | balanced_cost_le_logCost |
|
| Random trees (Chapter 22) | , in expectation | In a random BST, every key has expected depth at most . Treap updates are not formalized. | random_bst_depth_le |
| Multiple trees (Chapter 28), not a BST | , ratio | With successors per key and words, cost at most , in the linked-search model. | MultipleTrees.sequence |
With constants
The second figure separates the shared boxes and writes on each arrow the bound that the library proves. Bounds that share a box in the first figure are on one row here, with an arrow each way. The table below lists every arrow with its theorems.
| Relation | What is proved | Lean |
|---|---|---|
| Every execution with rotations has , for every reference tree. | rotation_lower_bound |
|
| , strict | From every initial tree, some pointer execution costs at most . Some families have . | Dynamic.optimal, Separation.family |
| From every initial tree, splaying is a pointer execution of cost at most . | pointer_workingSet |
|
| No execution bound holds, whatever and . | obstruction |
|
| and . | characterization |
|
| , strict | for every tree . Some families have . | optimal_root_finger, Sequential.family |
| , from any start key. | dynamic_finger |
|
| for every tree , and for some . | entropy_lower_bound, entropy_upper_bound |
|
| The working-set property implies static optimality. | workingSet_implies_staticOptimality |
|
| Static optimality implies the static finger property, for every finger. | staticOptimality_implies_staticFinger |
|
| for every finger and start key : a step from to costs at most the steps from to and from to . As properties, dynamic finger implies static finger. | dynamicFinger_le_fingerCost, dynamicFinger_implies_staticFinger |
|
| for every finger . As properties, static finger implies the logarithmic bound, with the same constants. (Only in the first figure.) | fingerCost_le_log, staticFinger_implies_logarithmic |
Some composite relations are also stated directly, as inequalities between benchmarks: and (Results.static_optimality, Results.static_finger), and a working-set algorithm competes with every fixed tree (Results.workingSet_competes).
Two classical facts are left off both maps. The working-set and dynamic finger bounds are incomparable, each beating the other by an unbounded factor on some family of sequences, but the library has no such families. And the unified charge of Section 14.7 has no formalized relations to the other benchmarks, beyond the splay theorem that uses it.