GATE Exam  >  GATE Questions  >   Number of binary trees formed with 5 nodes a... Start Learning for Free
Number of binary trees formed with 5 nodes are
  • a)
    32
  • b)
    36
  • c)
    120
  • d)
    42
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correc...
Possible number of binary trees formed when n number of nodes are given is 2nCn / n+1 so in this case the number of nodes are 5 so
Number of binary trees possible are = 10C5 / 6 = 10!/ 5! * 5! * 6 → 42
Hence option D is the correct answer
Total number of different Binary tree of size
5 : 14 + 5 + 4 + 5 + 14 = 42
View all questions of this test
Most Upvoted Answer
Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correc...
Explanation:
To form a binary tree with 5 nodes, we can have the following possible scenarios:

  • 1 node in the left subtree and 3 nodes in the right subtree

  • 2 nodes in the left subtree and 2 nodes in the right subtree

  • 3 nodes in the left subtree and 1 node in the right subtree



For the first scenario:
We have 1 node in the left subtree, which means we have 4 nodes left to place in the right subtree. The number of ways to choose 3 nodes from 4 nodes is 4C3 = 4. So, we have 4 possible binary trees for this scenario.

For the second scenario:
We have 2 nodes in the left subtree and 3 nodes left to place in the right subtree. We can choose 2 nodes from the 3 nodes in the right subtree in 3C2 = 3 ways. So, we have 3 possible binary trees for this scenario.

For the third scenario:
We have 3 nodes in the left subtree and 2 nodes left to place in the right subtree. We can choose 2 nodes from the 2 nodes in the right subtree in 2C2 = 1 way. So, we have 1 possible binary tree for this scenario.

Therefore, the total number of possible binary trees with 5 nodes is 4 + 3 + 1 = 8. Hence, the correct answer is option D (42).
Explore Courses for GATE exam
Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer?
Question Description
Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer?.
Solutions for Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer?, a detailed solution for Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer? has been provided alongside types of Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Number of binary trees formed with 5 nodes area)32b)36c)120d)42Correct answer is option 'D'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev