Authors
Fabrizio Luccio, Bernard Mans, Luke Mathieson, Linda Pagli
Publication date
2016/8
Journal
The Computer Journal
Volume
59
Issue
8
Pages
1252-1263
Publisher
OUP
Description
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 log 2 n 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.
Total citations
Scholar articles
F Luccio, B Mans, L Mathieson, L Pagli - The Computer Journal, 2016