[Math] Number of labeled non-isomorphic trees on $n$ vertices

graph theorytrees

Is there any algorithm to build or count the labeled non-isomorphic trees on $n$ vertices ?

Best Answer

From your comment, it sounds like you consider two labeled trees isomorphic if they have the same (labeled) degree sequence. Thus to count the number of non-isomorphic labeled trees we'd want the number of labeled degree sequences of trees on $n$ vertices, which is ${2n-3 \choose n-1}$.

Why is it ${2n-3 \choose n-1}$? Well, a degree sequence corresponds to a tree if and only if every degree is at least 1 and the degree sum is 2n-2. Thus, we need the number of n-tuples of positive integers that sum to 2n-2, which is ${2n-3 \choose n-1}$.