Abstract
We present a new scheme for representing binary trees. The scheme is based on rotations as a previous scheme of Zerling. In our method the items of a representation have a natural geometric interpretation, and the algorithms related to the method are simple. We give an algorithm for enumerating all the representations for trees onn nodes, and an algorithm for building the tree corresponding to a given representation.
Similar content being viewed by others
References
J. M. Pallo,Enumerating, ranking and unranking binary trees, Computer J. 29 (1986), 171–175.
A. Proskurowski and F. Ruskey,Binary tree gray codes, J. Algorithms 6 (1985), 225–238.
F. Ruskey and T. C. Hu,Generating binary trees lexicographically, SIAM J. Comput. 6 (1977), 745–758.
D. Zerling,Generating binary trees using rotations, J. ACM 32 (1985), 694–701.
Author information
Authors and Affiliations
Additional information
This work was supported by the Academy of Finland.