766 views
1 votes
1 votes
With 5 distinct nodes, the maximum no. of binary trees that can be formed is _____

2 Answers

Best answer
3 votes
3 votes
Catalan Number gives the count of distinct binary trees with nodes that cannot be distinguished with each other,i.e unlabelled nodes and only the structure of tree is different.

But, here nodes are distinct A,B,C,D,E and total permutations of them = 5! = 120 .

So, each structure of tree includes these permutations.

Hence, maximum number of BT = Catalan number * 120 = 5040
selected by
0 votes
0 votes
We have to maximise the number of binary trees, so go with labelled.

So, 5th Catalan multiplied by 5 factorial.

$\frac{10*9*8*7*6}{6*5*4*3*2}*5!=5040$
Answer:

Related questions

3 votes
3 votes
4 answers
1
Arjun asked Oct 10, 2016
752 views
What is the number of binary trees with $4$ nodes which when traversed in pre-order gives the sequence A, B, C, D?
6 votes
6 votes
5 answers
3
0 votes
0 votes
1 answer
4
Arjun asked Oct 10, 2016
284 views
Consider the array given below:20 10 9 8 7 6 5It isa full binary tree in array representationa complete binary tree in array representationa max-heap in array representat...