TY - JOUR
T1 - Complete balancing via rotation
AU - Luccio, Fabrizio
AU - Mans, Bernard
AU - Mathieson, Luke
AU - Pagli, Linda
PY - 2016/8/1
Y1 - 2016/8/1
N2 - Trees are a fundamental structure in algorithmics. In this paper, we study the transformation of an arbitrary binary tree S with n vertices into a completely balanced tree T via rotations, a widely studied elementary tree operation. Combining concepts on rotation distance and data structures, we give a basic algorithm that performs the transformation in Θ(n) time and Θ(1) space, making at most 2n - 2 log2n rotations and improving on known previous results. The algorithm is then improved, exploiting particular properties of S. Finally, we show tighter upper bounds and obtain a close lower bound on the rotation distance between a zig-zag tree and a completely balanced tree. We also find the exact rotation distance of a particular almost balanced tree to a completely balanced tree, and thus show that their distance is quite large despite the similarity of the two trees.
AB - Trees are a fundamental structure in algorithmics. In this paper, we study the transformation of an arbitrary binary tree S with n vertices into a completely balanced tree T via rotations, a widely studied elementary tree operation. Combining concepts on rotation distance and data structures, we give a basic algorithm that performs the transformation in Θ(n) time and Θ(1) space, making at most 2n - 2 log2n rotations and improving on known previous results. The algorithm is then improved, exploiting particular properties of S. Finally, we show tighter upper bounds and obtain a close lower bound on the rotation distance between a zig-zag tree and a completely balanced tree. We also find the exact rotation distance of a particular almost balanced tree to a completely balanced tree, and thus show that their distance is quite large despite the similarity of the two trees.
KW - complete binary tree
KW - design of algorithms
KW - rotation distance
KW - tree balancing
UR - http://www.scopus.com/inward/record.url?scp=84992109464&partnerID=8YFLogxK
UR - http://purl.org/au-research/grants/arc/DP130100237
U2 - 10.1093/comjnl/bxw018
DO - 10.1093/comjnl/bxw018
M3 - Article
AN - SCOPUS:84992109464
SN - 0010-4620
VL - 59
SP - 1252
EP - 1263
JO - Computer Journal
JF - Computer Journal
IS - 8
ER -