Question 29
29. A 5-ary tree is tree in which every internal node has exactly 5 children. The number of left (leaf) nodes in such a tree with 8 internal nodes will be :
Answer : (2) 33 Previous | Next |
UGC NET CS 2018 July - II Question 28 | UGC NET CS 2018 July - II Question 30 |
The question ask about total number of leaf nodes in 5-ary tree with 8 internal nodes
In above image you can check that number of leaf nodes are 33 and internal nodes are 8. Each internal nodes has exactly 5 children.
You can derive formula to calculate leaf and internal nodes in such complete tree.
In a complete n-ary tree,
Number Of leaf nodes, L = ( n − 1) ∗ I + 1 where L is No. of leaves and I is No. of Internel nodes
Here n = 5, I = 8
Therefore,
Number Of leaf nodes, L = ( n − 1) ∗ I + 1
= (5 - 1) * 8 + 1
= 4 * 8 + 1
= 33
You can also check this video here
According to UGC NET Answer key.
This question remains cancelled and marks awarded to all candidates appeared in the test.