NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improved Pattern-Avoidance Bounds for Greedy BSTs via Matrix Decomposition

Parinya Chalermsook, Manoj Gupta, Wanchote Jiamjitrak, Nidia Obscura Acosta, Akash Pareek, Sorrachai Yingchareonthawornchai

TL;DR

This paper significantly tightens the performance bounds for Greedy BST, a leading candidate for the "dynamically optimal" binary search tree. By introducing a novel matrix decomposition technique, the authors settle the postorder traversal conjecture and bring Greedy BST closer than ever to proving the elusive Dynamic Optimality Conjecture for several fundamental input classes.

What Problem Does This Paper Address?

In the world of data structures, the Dynamic Optimality Conjecture is a "holy grail." It posits that there exists an online binary search tree (BST) that performs within a constant factor of the best possible offline BST for any given sequence of searches. Two main candidates have dominated this discussion for decades: Splay Trees and Greedy BSTs.

While proving this for all sequences is notoriously difficult, researchers often focus on "pattern-avoiding" sequences—inputs that follow specific structures, like preorder or postorder traversals of a tree. Before this paper, the bounds for Greedy BST on these sequences were somewhat loose, often involving exponential factors of the inverse Ackermann function ($\alpha(n)$), a function that grows so slowly it is practically constant, but mathematically significant. The authors aim to close these gaps and prove that Greedy BST is indeed highly efficient for these structured inputs.

Methods

The authors utilize a geometric view of BSTs, where an access sequence is represented as a set of points in a 2D plane. The execution log of the Greedy algorithm—which keys are "touched" and when—is represented as a binary matrix $G_X$.

The core innovation is the Matrix Decomposition technique:

  1. Partitioning: Instead of analyzing the entire execution matrix $G_X$ at once (which is complex and contains many patterns), they decompose it into several simpler sub-matrices ($M_1, M_2, \dots, M_\ell$) based on the structure of the input.
  2. Forbidden Submatrix Theory: They show that each sub-matrix avoids a specific, much smaller "forbidden" pattern.
  3. Extremal Bounds: By applying known bounds from extremal combinatorics to these simpler sub-matrices and summing them up, they achieve much tighter overall bounds than previous "black-box" reductions allowed.
  4. Capture Gadgets: They use geometric "gadgets" (logical proofs about point placement) to reveal where input points must exist relative to the tree's operations, forcing the matrix to avoid certain inefficient configurations.

Datasets

As a theoretical computer science paper, this work does not use empirical datasets. Instead, it evaluates the algorithm against mathematical classes of input sequences:

  • Preorder and Postorder Traversals: Sequences generated by visiting nodes of a fixed BST in a specific order.
  • Deque Sequences: Sequences representing operations on a double-ended queue (insert/delete at min/max).
  • Split Sequences: Sequences where keys are moved to the root and then deleted, splitting the tree.
  • $k$-increasing Sequences: A generalization of sequential access that avoids certain decreasing patterns of length $k$.

Key Insights and Ideas

  • The Power of Decomposition: The "aha moment" is realizing that while the full execution log of Greedy might contain "bad" patterns, those patterns are often split across different structural components of the matrix. Analyzing them separately makes the math much cleaner.
  • Settling Postorder: The authors completely settle the postorder traversal conjecture for Greedy, proving it takes $O(n)$ time. Previously, this was only known for Splay trees in very specific cases.
  • Traversal implies Split: They show a formal link between traversal properties and the "split" property, a connection not yet established for Splay trees.
  • Combinatorial Progress: Beyond BSTs, they discovered a new class of "reducible" permutation matrices in extremal combinatorics that have polynomial bounds, providing progress on an open question by Jacob Fox (2013).

Key Results

The paper provides the best-known bounds for Greedy BST across several categories:

Input Class Previous Best Bound This Paper's Bound Improvement
Preorder $n 2^{\alpha(n)^{O(1)}}$ $O(n 2^{\alpha(n)})$ Tightened exponential factor
Postorder $n 2^{\alpha(n)^{O(1)}}$ $O(n)$ Fully Settled
Deque $O(m 2^{\alpha(m, m+n)})$ $O(m \alpha(n))$ Exponential to Linear in $\alpha(n)$
Split Not discussed $O(n 2^{\alpha(n)})$ New result
$k$-Increasing $O(nk^2)$ $O(n \cdot \min\{k^2, k \alpha(n)\})$ Better for large $k$

Note: $\alpha(n)$ is the inverse Ackermann function.

Limitations and Future Work

  • The Preorder Gap: While the preorder bound is significantly improved, it is still not $O(n)$. There remains a small $2^{\alpha(n)}$ factor to eliminate to fully settle that conjecture.
  • Greedy vs. Splay on Deque: For the deque property, Splay trees currently have a slightly better bound ($O(m \alpha^*(n))$ vs Greedy's $O(m \alpha(n))$). Closing this gap is an open challenge.
  • General Dynamic Optimality: The ultimate goal remains proving that Greedy is $O(1)$-optimal for any sequence, not just those that avoid specific patterns. The authors believe their decomposition trick will be a key tool in reaching this goal.

Summary updated

BibTeX
@inproceedings{chalermsook2023improved,
  author = {Parinya Chalermsook and Manoj Gupta and Wanchote Jiamjitrak and Nidia Obscura Acosta and Akash Pareek and Sorrachai Yingchareonthawornchai},
  title = {{Improved Pattern-Avoidance Bounds for Greedy BSTs via Matrix Decomposition}},
  booktitle = {SODA},
  year = {2023},
  doi = {10.1137/1.9781611977554.ch22},
}
Figure