Table of Contents
Fetching ...

On Rotation Distance of Rank Bounded Trees

Anoop S. K. M., Jayalal Sarma

TL;DR

This work investigates the rotation distance problem for full binary trees through a rank-based lens, introducing the rank-bounded rotation distance $d_R$ and showing a polynomial-time reduction from the general RotDist problem to RotDist_R.A complete analysis is developed for rank-1 skew trees, yielding an $O(n^2)$-time algorithm and establishing the $d_R$ upper bound $\le n^2$ in this regime, along with a broader $n^2(1+(2n+1)(r_1+r_2-2))$ bound for higher ranks.The authors introduce a permutation-based encoding and a bivariate tree polynomial framework linking trees to combinatorial structures, and they prove key characterizations: tree permutations, rotations via transpositions, and skew-permutation structure.These methods enable reductions to rank-bounded and height-bounded path problems, offering a tractable path toward understanding rotation distance under structural constraints and guiding future hardness and algorithmic results.

Abstract

Computing the rotation distance between two binary trees with $n$ internal nodes efficiently (in $poly(n)$ time) is a long standing open question in the study of height balancing in tree data structures. In this paper, we initiate the study of this problem bounding the rank of the trees given at the input (defined by Ehrenfeucht and Haussler (1989) in the context of decision trees). We define the rank-bounded rotation distance between two given binary trees $T_1$ and $T_2$ (with $n$ internal nodes) of rank at most $r$, denoted by $d_r(T_1,T_2)$, as the length of the shortest sequence of rotations that transforms $T_1$ to $T_2$ with the restriction that the intermediate trees must be of rank at most $r$. We show that the rotation distance problem reduces in polynomial time to the rank bounded rotation distance problem. This motivates the study of the problem in the combinatorial and algorithmic frontiers. Observing that trees with rank $1$ coincide exactly with skew trees (binary trees where every internal node has at least one leaf as a child), we show the following results in this frontier : We present an $O(n^2)$ time algorithm for computing $d_1(T_1,T_2)$. That is, when the given trees are skew trees (we call this variant as skew rotation distance problem) - where the intermediate trees are restricted to be skew as well. In particular, our techniques imply that for any two skew trees $d(T_1,T_2) \le n^2$. We show the following upper bound : for any two trees $T_1$ and $T_2$ of rank at most $r_1$ and $r_2$ respectively, we have that: $d_r(T_1,T_2) \le n^2 (1+(2n+1)(r_1+r_2-2))$ where $r = max\{r_1,r_2\}$. This bound is asymptotically tight for $r=1$. En route our proof of the above theorems, we associate binary trees to permutations and bivariate polynomials, and prove several characterizations in the case of skew trees.

On Rotation Distance of Rank Bounded Trees

TL;DR

This work investigates the rotation distance problem for full binary trees through a rank-based lens, introducing the rank-bounded rotation distance $d_R$ and showing a polynomial-time reduction from the general RotDist problem to RotDist_R.A complete analysis is developed for rank-1 skew trees, yielding an $O(n^2)$-time algorithm and establishing the $d_R$ upper bound $\le n^2$ in this regime, along with a broader $n^2(1+(2n+1)(r_1+r_2-2))$ bound for higher ranks.The authors introduce a permutation-based encoding and a bivariate tree polynomial framework linking trees to combinatorial structures, and they prove key characterizations: tree permutations, rotations via transpositions, and skew-permutation structure.These methods enable reductions to rank-bounded and height-bounded path problems, offering a tractable path toward understanding rotation distance under structural constraints and guiding future hardness and algorithmic results.

Abstract

Computing the rotation distance between two binary trees with internal nodes efficiently (in time) is a long standing open question in the study of height balancing in tree data structures. In this paper, we initiate the study of this problem bounding the rank of the trees given at the input (defined by Ehrenfeucht and Haussler (1989) in the context of decision trees). We define the rank-bounded rotation distance between two given binary trees and (with internal nodes) of rank at most , denoted by , as the length of the shortest sequence of rotations that transforms to with the restriction that the intermediate trees must be of rank at most . We show that the rotation distance problem reduces in polynomial time to the rank bounded rotation distance problem. This motivates the study of the problem in the combinatorial and algorithmic frontiers. Observing that trees with rank coincide exactly with skew trees (binary trees where every internal node has at least one leaf as a child), we show the following results in this frontier : We present an time algorithm for computing . That is, when the given trees are skew trees (we call this variant as skew rotation distance problem) - where the intermediate trees are restricted to be skew as well. In particular, our techniques imply that for any two skew trees . We show the following upper bound : for any two trees and of rank at most and respectively, we have that: where . This bound is asymptotically tight for . En route our proof of the above theorems, we associate binary trees to permutations and bivariate polynomials, and prove several characterizations in the case of skew trees.
Paper Structure (17 sections, 26 theorems, 4 equations, 2 figures, 1 algorithm)

This paper contains 17 sections, 26 theorems, 4 equations, 2 figures, 1 algorithm.

Key Result

Theorem 1.0

RotDist many-one reduces to $\textrm{\sc RotDist}_R$ in polynomial time.

Figures (2)

  • Figure 1: Right rotation at node "a"
  • Figure 3: Two distinct full binary trees with same tree polynomial. Here $m_1=m_1', m_2=m_3', m_3=m_4', m_4=m_2', m_5=m_5'$

Theorems & Definitions (26)

  • Theorem 1.0
  • Theorem 1.0
  • Theorem 1.0
  • Theorem 1.0
  • Theorem 1.0
  • Lemma 1.0
  • Theorem 1.1
  • Proposition 2.1
  • Lemma 2.2: STT86
  • Theorem 3.0
  • ...and 16 more