Abstract

The problem of the direct generation in A-order of binary trees was stated by Zaks in 1980. In 1988 Roelants van Baronaigien and Ruskey gave a solution for k-ary trees with n internal nodes using an encoding sequence of kn+1 integers between 1 and n. Vajnovszki and Pallo improved this result for binary trees in 1994 using words of length n–1 on a four letter alphabet. Recently Korsh generalized the Vajnovszki and Pallo’s generating algorithm to k-ary trees using an alphabet whose cardinality depends on k but not on n. We give in this paper ranking and unranking algorithms for k-ary trees using the Korsh’s encoding scheme.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call