Papers › Amortized Rotation Cost in AVL Trees
Amortized Rotation Cost in AVL Trees
Mahdi Amani, Kevin A. Lai, Robert E. Tarjan
The archive published only this paper's code-link row. Authors, date and abstract are from arXiv's metadata (CC0), read from the Kaggle arXiv metadata snapshot of 2026-09-12 where its title matched the archive's; the title is the archive's.
An AVL tree is the original type of balanced binary search tree. An insertion in an n-node AVL tree takes at most two rotations, but a deletion in an n-node AVL tree can take Θ(logn). A natural question is whether deletions can take many rotations not only in the worst case but in the amortized case as well. A sequence of n successive deletions in an n-node tree takes O(n) rotations, but what happens when insertions are intermixed with deletions? Heaupler, Sen, and Tarjan conjectured that alternating insertions and deletions in an n-node AVL tree can cause each deletion to do Ω(logn) rotations, but they provided no construction to justify their claim. We provide such a construction: we show that, for infinitely many n, there is a set E of {\it expensive} n-node AVL trees with the property that, given any tree in E, deleting a certain leaf and then reinserting it produces a tree in E, with the deletion having done Θ(logn) rotations. One can do an arbitrary number of such expensive deletion-insertion pairs. The difficulty in obtaining such a construction is that in general the tree produced by an expensive deletion-insertion pair is not the original tree. Indeed, if the trees in E have even height k, 2^(k/2) deletion-insertion pairs are required to reproduce the original tree.
Code
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
Not run by Syntology. Nothing on this page verifies that the listed code works.
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections