29 votes 29 votes The maximum number of binary trees that can be formed with three unlabeled nodes is: $1$ $5$ $4$ $3$ DS gatecse-2007 data-structures binary-tree normal + – Kathleen asked Sep 21, 2014 • edited Dec 26, 2017 by kenzou Kathleen 31.9k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply smsubham commented Dec 22, 2017 reply Follow Share For unlabelled tree T(n) = (2n)! / (n+1)!n! Number of Labeled Tees = (Number of unlabeled trees) * n! = [(2n)! / (n+1)!n!] × n! Useful read https://www.geeksforgeeks.org/enumeration-of-binary-trees/ 7 votes 7 votes KUSHAGRA गुप्ता commented Dec 29, 2019 reply Follow Share $\#\ of\ unlabelled\ binary\ trees\ for\ n-nodes$ $= \dfrac{^{2n}C_{n}}{n+1}$$=$$\dfrac{(2n)!}{(n+1)!\ n!}$ $\#\ of\ labelled\ binary\ trees\ for\ n-nodes$ $=n!$ $\left \{ \#\ of\ unlabelled\ binary\ tree \right \}$ 7 votes 7 votes Please log in or register to add a comment.
Best answer 33 votes 33 votes Can be found with formula... $(2nCn/n+1)$... $n$ being the number of nodes. for the given question... where $n=3$... answer is $5$. Let me also specify here.. that number of Binary Search Trees with $n$ nodes is equal to number of unlabeled Binary trees. http://gatecse.in/wiki/Number_of_Binary_trees_possible_with_n_nodes Correct Answer: $B$ Gate Keeda answered Sep 23, 2014 • edited May 4, 2019 by Naveen Kumar 3 Gate Keeda comment Share Follow See all 6 Comments See all 6 6 Comments reply pC commented Jan 4, 2016 reply Follow Share What if it is labeled 0 votes 0 votes ryan sequeira commented Jan 26, 2016 reply Follow Share if its labeled, then since its only a binary tree and not BST, we multiply it with 3! (n! for n nodes) 11 votes 11 votes pC commented Jan 27, 2016 reply Follow Share If it was BST then it would be still 5 even if it is labeled , is it not @ryan sequeira ? correct me if wrong . 1 votes 1 votes ryan sequeira commented Jan 27, 2016 reply Follow Share yes, in case of BST the nodes can have only one arrangement, i.e sorted order 6 votes 6 votes Sachin Mittal 1 commented Dec 25, 2016 reply Follow Share In Unlabeled tree's only structure matters, what's value in node that does not matter. 1. o 2. o 3. o 4. o 5. o \ \ / \ / / o o o o o o / \ / \ o o o o With three unlabeled node, there are 5 trees. If they were labeled, then each strucure can be filled with 3! ways. 26 votes 26 votes Sandeep Suri commented Jan 20, 2017 reply Follow Share Yes it's okay to do it with formula but we can also do this by using permutation and combination and just by visualising and analysing as numbe of node is 3. it willbe 5. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes There are 5 binary trees maximum Bhagirathi answered Sep 22, 2014 Bhagirathi comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Answer is 5. By using 2ncn/(n+1) used for finding the number of unlabelled trees. eshita1997 answered Oct 10, 2020 eshita1997 comment Share Follow See all 0 reply Please log in or register to add a comment.