edited by
1,021 views
1 votes
1 votes
four vertices {A,B,C,D} is given which has only vertex D as a leaf total number of binary tree are possible when every binary tree has four node!
edited by

2 Answers

0 votes
0 votes

Its mentioned that node D will always be leaf node and tree has always 1 leaf node also. Hence we are left with 3 nodes.

At 1st level we can have 3C1 choices to select node

At 2nd level we have 2 nodes left so we can select 2C1  *2   as either we can put the node at right or left

at 3rd we have 1 node left and we can place it at either left or right so 2 

at left D can be also placed at right or left so 2

so 3C1 * 2C1 *2  *2 *2   = 48 BT