Dynamic Binary Search Trees: Improved Lower Bounds for the Greedy-Future Algorithm

Yaniv Sadeh, Haim Kaplan

Introduction

In the field of theoretical computer science, the Dynamic Optimality Conjecture remains one of the most significant open questions regarding data structures. It posits the existence of an online Binary Search Tree (BST) algorithm that performs within a constant factor of the best possible offline algorithm for any given sequence of searches. Greedy-Future (GF) is a prominent candidate for this distinction, utilizing future query information to restructure the search path into a "treap" based on when items will be needed next.

This paper, presented at STACS 2023, provides a substantial update to our understanding of GF's limitations. By constructing specific access patterns that exploit the algorithm's logic, the authors establish a new lower bound for its competitive ratio and refute long-standing conjectures regarding its efficiency gap, proving that GF is less efficient than previously assumed.

The Greedy-Future Algorithm and Previous Bounds

The Greedy-Future algorithm operates by looking ahead at future queries. When an item is accessed, the algorithm restructures the search path into a treap where the priority of each node is determined by the time of its next required access. This intuitive approach is designed to keep nodes that will be needed soonest near the root of the tree to minimize future search costs.

Prior to this research, the best-known lower bound on the competitive ratio of GF—the ratio of its performance cost to that of an optimal offline algorithm (OPT)—was approximately 1.33. Additionally, it was widely believed that the "additive gap" (the extra cost GF incurs beyond the optimum) was linear in relation to the number of queries, denoted as $O(m)$.

Methodology: Stable Sequences and the "Static Trick"

The authors depart from the "geometric view" commonly used in recent BST research, returning instead to a "tree-view" analysis. Their core innovation involves the definition and application of Stable Sequences.

Exploiting Algorithmic "Laziness"

Although GF is a dynamic algorithm, the authors identified specific access patterns—Mixed-Stable Sequences—where the algorithm's own rules prevent it from restructuring the tree. By forcing GF into a "static" state, the researchers could more easily compare its performance against an optimal strategy that would actively improve the tree structure.

Recursive Tree Constructions

To implement this "static trick," the authors designed complex, recursive tree structures:

  • F-trees: Based on Fibonacci numbers, these trees place queried items at the leaves to maximize search depth.
  • (k, r)-trees: A new family of recursive trees used to demonstrate the growth of the additive gap.

By comparing GF's static cost on these trees to an optimal algorithm that can "promote" leaves closer to the root, the authors established a rigorous lower bound. This analysis was supported by Wilber’s First Bound, a standard tool for lower-bounding the cost of any BST algorithm.

Key Results

The study provides four major contributions to the analysis of the Greedy-Future algorithm:

  1. Increased Competitive Ratio: The authors proved that the ratio of $\frac{Cost(GF)}{Cost(OPT)} \ge 2$, a significant improvement over the previous bound of 1.33.
  2. Refutation of the Linear Gap: The research proves that the additive gap is $\Omega(m \log \log n)$. This demonstrates that as the tree size ($n$) grows, GF's inefficiency compared to the optimum increases, rather than remaining a constant penalty per query.
  3. Asymmetry in Reversal: The authors showed that GF is sensitive to the direction of a sequence. For certain patterns, the cost of processing a sequence in reverse is approximately twice the cost of the original sequence ($Cost(GF, rev(X)) \approx 2 \times Cost(GF, X)$).
  4. Lack of Approximate Monotonicity: The paper proves that GF can exhibit counter-intuitive behavior; removing queries from a sequence can actually increase the algorithm's total cost relative to the original sequence.

Conclusion

The findings of this paper do not disqualify Greedy-Future from being dynamically optimal, but they do establish that the "constant factor" of its optimality must be at least 2. For the specific "mixed-stable" sequences analyzed, the authors found that GF is at most 2.5 times the optimal cost, suggesting that the lower bound of 2.0 is quite tight for this class of sequences.

The primary challenge remaining is the analysis of sequences where GF is forced to actively restructure the tree. While this study focused on sequences where GF remains static, future work may reveal even higher competitive ratios in more dynamic scenarios. The significant gap between the current lower bound of 2 and the best known upper bound of $O(\log \log n)$ remains a critical area for future theoretical exploration.

Summary updated

BibTeX
@inproceedings{sadeh2023dynamic,
  author = {Yaniv Sadeh and Haim Kaplan},
  title = {{Dynamic Binary Search Trees: Improved Lower Bounds for the Greedy-Future Algorithm}},
  booktitle = {STACS},
  year = {2023},
  doi = {10.4230/lipics.stacs.2023.53},
}
Figure