Abstract
The restricted rotation distance d R (S, T) between two binary trees S, T of n vertices is the minimum number of rotations by which S can be transformed into T, where rotations can only take place at the root of the tree, or at the right child of the root. A sharp upper bound d R (S, T) ≤ 4n – 8 is known, based on the word metric of Thompson’s group. We refine this bound to a sharp d R (S, T) ≤ 4n – 8 – ρS – ρT, where ρS and ρT are the numbers of vertices in the rightmost vertex chains of the two trees, by means of a very simple transformation algorithm based on elementary properties of trees. We then generalize the concept of restricted rotation to k-restricted rotation, by allowing rotations to take place at all the vertices of the highest k levels of the tree. For k = 2 we show that not much is gained in the worst case, although the classical problem of rebalancing an AVL tree can be solved efficiently, in particular rebalancing after vertex deletion requires O(log n) rotations as in the standard algorithm. Finding significant bounds and applications for k ≥ 3 is open.
Keywords
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Cleary, S.: Restricted rotation distance between binary trees. Information Processing Letters 84, 333–338 (2002)
Cleary, S., Taback, J.: Bounding restricted rotation distance. Information Processing Letters 88(5), 251–256 (2003)
Knuth, D.E.: The Art of Computer Algorithms: Sorting and Searching, vol. 3. Addison-Wesley, Reading (1973)
Luccio, F., Pagli, L.: On the upper bound on the rotation distance of binary trees. Information Processing Letters 31(2), 57–60 (1989)
Luccio, F., Pagli, L.: General restricted rotation distance, Universit‘a di Pisa, Dipartimento di Informaticà, Tech. Rep. TR-04-22 (2004)
Mäkinen, E.: On the rotation distance of binary trees. Information Processing Letters 26(5), 271–272 (1988)
Pallo, J.: An efficient upper bound of the rotation distance of binary trees. Information Processing Letters 73(3-4), 87–92 (2000)
Rogers, R.: On finding shortest paths in the rotation graph of binary trees. In: Proc. Southeastern Internat. Conf. on Combinatorics, Graph Theory, and Computing, vol. 137, pp. 77–95 (1999)
Sleator, D.D., Tarjan, R.E., Thurston, W.R.: Rotation distance, triangulations, and hyperbolic geometry. J. Amer. Math. Soc. 1(3), 647–681 (1988)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ruiz, A.A., Luccio, F., Enriquez, A.M., Pagli, L. (2005). k-Restricted Rotation with an Application to Search Tree Rebalancing. In: Dehne, F., López-Ortiz, A., Sack, JR. (eds) Algorithms and Data Structures. WADS 2005. Lecture Notes in Computer Science, vol 3608. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11534273_2
Download citation
DOI: https://doi.org/10.1007/11534273_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-28101-6
Online ISBN: 978-3-540-31711-1
eBook Packages: Computer ScienceComputer Science (R0)