This question was previously asked in

UGC NET CS 2020 Official Paper

Option 3 : 5

NIC Scientist B 2020: Full Mock Test

2764

120 Questions
120 Marks
180 Mins

The correct answer is **option 3.**

__Key Points__

If the tree is 1-ary and 'I' is an internal node, the number of leaves is 1

If the tree is 2-ary and 'I' is an internal node, the number of leaves is I+1

If the tree is 3-ary and 'I' is an internal node, the number of leaves is 2I+1

If the tree is 4-ary and 'I' is an internal node, the number of leaves is 3I+1

If the tree is 5-ary and 'I' is an internal node, the number of leaves is 4I+1

If the tree is n-ary and 'I' is an internal node, the number of leaves is (n-1)I+1

Given that leaves L= 41, internal nodes I=10

L=(n-1)I+1

41=10(n-1)+1

10n=50

n=5

**∴ Hence the correct answer is** *5.*

Internal nodes I=10

Leaf nodes L=41

In an n-ary tree, the levels start at 0 and there are n^{k} nodes at each level, where k is the level number.

Total number of nodes−L=I

(1+n^{1}+n^{2}+⋯+n^{K})−L=I

(1+n^{1}+n^{2}+⋯+n^{K})−41=10

(n^{1}+n^{2}+⋯+n^{K})=50

\(\frac{n(n^K−1)}{n-1}\)=50

Option verify, if n=3, nK=35 is not equal to leaves.

if n=4, nK=39 is not equal to leaves.

if n=5, nK=41 is equal to leaves. So, it is 5-ary tree.

if n=6, nK=43 is not equal to leaves.