OFFSET
0,3
COMMENTS
LINKS
Antti Karttunen, Alternative Catalan Orderings (with the complete Scheme source)
EXAMPLE
The empty tree . has code 0, the tree of two edges (and leaves) \/ has code 1 and in general tree's code is obtained by interleaving into odd and even bits (above bit-0, which is always 1 for nonempty trees) the codes for the left and right hand side subtrees of the tree.
PROG
(Scheme-functions showing the essential idea. For the full source, follow the "Alternative Catalan Orderings" link.)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 06 2003
STATUS
approved