Decode the Prüfer code by repeatedly attaching the smallest label absent from the remaining code to its first entry. This produces the successive edges , , , , followed by the final edge . Thus
Decoding the Prüfer sequence gives the five displayed edges
. Details. Take root one, its children two and three, the children of two to be four and five, and those of three to be six and seven. Its edge set is . The root has degree two, vertices two and three have degree three, and the remaining vertices have degree one.
Removing the smallest available leaves in order gives , with recorded neighbors . Therefore its Prüfer code is
If there are nonroot interior vertices and leaves, then and the tree degree sum is . Hence and . Distribute these two nonroot interior vertices among the root's two descendant branches.
Either each branch contains one interior vertex, producing the balanced tree with two cherries, or both are in one branch while the other branch is a leaf. The latter gives a single unbalanced shape, because left and right children are not ordered. Thus there are two unlabelled rooted binary trees. A plane ordering of children would be additional structure not present in the question.
In a Prüfer code, a vertex label occurs exactly its degree minus one times. A rooted binary tree with vertices has one root of degree two, other interior vertices of degree three, and leaves. Its code of length therefore has one label occurring once, labels occurring twice, and all other labels absent.
Articles by others on the same topic
There are currently no matching articles.

