retagged by
305 views

1 Answer

Best answer
1 votes
1 votes

Number of trees on n vertices is $n^{n-2}$. 

Therefore for 5 vertices, number of trees = $5^{5-2}$ = $5^3$ = 125.

For more information about the number of trees possible.

http://www-math.mit.edu/~djk/18.310/18.310F04/counting_trees.html

For more information about the number of binary trees possible.

https://stackoverflow.com/questions/3042412/with-n-no-of-nodes-how-many-different-binary-and-binary-search-trees-possib

Follow both the links for the descriptive answer about trees.

selected by

Related questions

392
views
0 answers
1 votes
amit166 asked Nov 24, 2018
392 views
296
views
2 answers
0 votes
amit166 asked Nov 24, 2018
296 views
Number of possible ordered trees with 3 nodes x,y,z
390
views
1 answers
0 votes
amit166 asked Nov 15, 2018
390 views
1.7k
views
3 answers
1 votes
Sambhrant Maurya asked Jul 27, 2018
1,737 views
The number of binary search trees possible with 12 keys, when keys 1, 2, 3, 4, ........ 12 are inserted into empty Binary Search Tree with condition such ... the root of binary search tree and 8 is immediate right child of 4 are ________.