# Prüfer Codes of Labeled Trees

Prüfer Codes of Labeled Trees

In 1889, Cayley proved that there are labeled trees on nodes. In 1918, Prüfer found a method for constructing each tree.

n-2

n

n

Consider the tree with code {2, 8, 9, 4, 7, 7, 2} that is given as the default tree in this Demonstration. The first digit of the Prüfer code is the branch that has the smallest isolated number. Pruning that branch gives a new tree, and the process repeats, as shown in the Details.