Machine-translated by Google. Questions are authored in English.
Top

Discussion

Number of binary trees formed with 5 nodes are

  • A.32
  • B.36
  • C.120
  • D.42

Answer: D

The number of different binary trees that can be formed with n nodes is the Catalan number, the binomial coefficient of 2n over n divided by n + 1. For n = 5 this is

\[ \frac{1}{6}\binom{10}{5} = \frac{252}{6} = 42 \]

So there are 42 binary trees with 5 nodes, option (D). The values 32 and 120 are 2 to the power 5 and 5 factorial, which do not count binary tree shapes, and 36 is not the Catalan number.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.