What's the number of distinct binary trees possible with n distinct nodes?
For a binary tree with <math>n</math> nodes, the number of edges is <math>n-1</math>.So, this problem can be reduced to the number of ways in which we can make <math>n-1</math> edges from <math>n</math> vertices. An edge can be made either as a left child of a vertex or as a right child. Hence, for <math>n</math> vertices, we have <math>2n</math> possibilities for the first edge chosen, <math>2n-1</math> for the second and so on. Thus for <math>n-1</math> edges, the total number of ways
= $2n * (2n-1) * (2n-2) * .... * (2n - (n - 2))$
= $2n * (2n-1) * (2n-2) * .... * (n + 2)$
=$ \frac{(2n)!} { (n+1)!}$
If the nodes are similar (unlabelled), then the number of distinct binary trees will be
$ \frac{(2n)!} { (n+1)! n!}$
=$\frac{2nCn}{n+1}$
What's the number of distinct binary trees possible with n distinct nodes?
For a binary tree with <math>n</math> nodes, the number of edges is <math>n-1</math>.So, this problem can be reduced to the number of ways in which we can make <math>n-1</math> edges from <math>n</math> vertices. An edge can be made either as a left child of a vertex or as a right child. Hence, for <math>n</math> vertices, we have <math>2n</math> possibilities for the first edge chosen, <math>2n-1</math> for the second and so on. Thus for <math>n-1</math> edges, the total number of ways
= $2n * (2n-1) * (2n-2) * .... * (2n - (n - 2))$
= $2n * (2n-1) * (2n-2) * .... * (n + 2)$
=$ \frac{(2n)!} { (n+1)!}$
If the nodes are similar (unlabelled), then the number of distinct binary trees will be
$ \frac{(2n)!} { (n+1)! n!}$
=$\frac{2nCn}{n+1}$