Rotation distance using flows
Claire Mathieu, William Thurston
TL;DR
This work proves the maximum rotation distance between binary trees with $n$ internal nodes is exactly $2n-6$ using a new, elementary, combinatorial approach. It reformulates rotations as diagonal flips in triangulations of an $(n+2)$-gon, then constructs a weight function on oriented triangles via a flow-based method and the max-flow min-cut theorem to derive a potential bound. By selecting two explicitly defined far-apart triangulations and analyzing their union graph, the authors show any flip can alter the total weight by at most $1$, while the two reference triangulations have a weight difference of $2n-6$, establishing the lower bound. The paper also highlights a linear programming perspective on the dual constraints and discusses broader implications for amortized analyses and problems evolving through local transformations.
Abstract
Splay trees are a simple and efficient dynamic data structure, invented by Sleator and Tarjan. The basic primitive for transforming a binary tree in this scheme is a rotation. Sleator, Tarjan, and Thurston proved that the maximum rotation distance between trees with n internal nodes is exactly 2n-6 for trees with n internal nodes (where n is larger than some constant). The proof of the upper bound is easy but the proof of the lower bound, remarkably, uses sophisticated arguments based on calculating hyperbolic volumes. We give an elementary proof of the same result. The main interest of the paper lies in the method, which is new. It basically relies on a potential function argument, similar to many amortized analyses. However, the potential of a tree is not defined explicitly, but by constructing an instance of a flow problem and using the max-flow min-cut theorem.
