recategorized by
3,008 views
5 votes
5 votes

The number of structurally different possible binary trees with $4$ nodes is 

  1. $14$
  2. $12$
  3. $336$
  4. $168$
recategorized by

2 Answers

Best answer
12 votes
12 votes
  • structurally different  trees = Unlabeled trees 
  • Number of Unlabeled binary trees = (2n)!/(n+1)!n!  [Catalan Number]
    • Here n =4
    • answer = 8!/(5! 4!) =14
selected by
1 votes
1 votes
No of unlabelled binary trees on n nodes = $\frac{_{n}^{2n}\textrm{C}}{n+1}$

No of labelled binary trees on n nodes = $\left ( \frac{_{n}^{2n}\textrm{C}}{n+1} \right )*n!$

Structurally different = unlabelled = $\frac{_{4}^{8}\textrm{C}}{5}$ = $14$
Answer:

Related questions

3 votes
3 votes
2 answers
1
gatecse asked Dec 17, 2017
1,246 views
The $in$-$order$ and $pre$-$order$ traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$ respectively.The $post$-$order$ traversal of a binary ...
3 votes
3 votes
2 answers
2
gatecse asked Dec 17, 2017
3,736 views
Which one of the following property is correct for a red-black tree?Every simple path from anode to a descendant leaf contains the same number of black nodes.If a node is...
2 votes
2 votes
2 answers
3
gatecse asked Dec 17, 2017
1,263 views
A strictly binary tree with $10$ leavescannot have more than $19$ nodeshas exactly $19$ nodeshas exactly $17$ nodeshas exactly $20$ nodes
1 votes
1 votes
1 answer
4
gatecse asked Dec 17, 2017
881 views
The minimum number of stacks needed to implement a queue is$3$$1$$2$$4$