Number of labeled non-isomorphic trees on $n$ vertices

4.7k Views Asked by At

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

2

There are 2 best solutions below

0
On

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}$.

1
On

It should be $C_{n-1}=\frac{1}{n}{2(n-1) \choose n-1}$, where $C_n$ is the $n^\text{th}$ Catalan number