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

2 Answers

Best answer
3 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 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:
Position:
Show:

Related questions

3 3 votes
4 answers 4 answers
1.8k
1.8k views
Arjun asked Oct 10, 2016
1,832 views
What is the number of binary trees with $4$ nodes which when traversed in pre-order gives the sequence A, B, C, D?
1 1 vote
2 2 answers
947
947 views
Arjun asked Oct 10, 2016
947 views
Consider the following nested representation of Binary Trees.$(ABC)$ indicates $B$ and $C$ are left and right subtrees of node $A$ respectively. Note that $B$ and $C$ may...
7 7 votes
5 answers 5 answers
2.6k
2.6k views
Arjun asked Oct 10, 2016
2,610 views
A program takes as input a binary tree (not necessarily balanced) with $n$ nodes and computes for each node, the no. of leaf nodes in the sub-tree rooted at that node. Th...
0 0 votes
1 answers 1 answer
601
601 views
Arjun asked Oct 10, 2016
601 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...