All mock tests are FREE till 31 December — register to save your progress
Unit 1 · Discrete Structures and Optimization Paper 2 CS · December 2022 Shift 1

Consider the following statements:
A. The number of labelled binary trees possible with n nodes is (2n)!/(n+1)!
B. The number of binary search trees possible with n (distinct) keys is (2n)!/((n+1)! n!)
C. The number of unlabelled binary trees possible with n nodes is C(2n, n)/(n+1)!
D. The number of simple, undirected, labelled graphs possible with n vertices is 2^(n(n−1)/2)
Choose the correct answer from the options given below:

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. A, B and D are only correct

Explanation

Unlabelled binary trees (and BSTs) are counted by the Catalan number C(2n,n)/(n+1) = (2n)!/((n+1)!n!). Labelled trees multiply this by n!, giving (2n)!/(n+1)!. Labelled graphs: each of the C(n,2) edges is present or absent. C is wrong, since it divides by (n+1)! instead of (n+1).

More Discrete Structures and Optimization questions