News for hackers. Stuff that matters.
Re:Enumerating Trees (2013) by drdeca on Saturday September 15, 2018 @12:27AM (#17992989)
For unlables rooted trees, there are also the matula numbers which naturally map between these trees and the natural numbers.

Also, if you want binary trees, another way to do that could be to take any bijection between positive natural numbers and pairs of natural numbers (including 0), and, well, it is fairly straightforward.

Let 0 correspond to the tree of one vertex (no children), and then for any binary tree, associate it with the natural number corresponding to the pair of natural numbers which are associated with the two child subtrees.

The specific bijection used to pair them is up to you. This page seems to describe one example of this.

Re:Enumerating Trees (2013) by sagebird on Saturday September 15, 2018 @04:14AM (#17993507)
I have explored Matula numbers/trees before knowing what they were called. The following document has example trees and an explanation : http://williamsharkey.com/integer-tree-isomorphism.pdf