UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 29)
Q 29. A 5-ary tree is tree in which every internal node has exactly 5 children. The number ofleft leaf nodes in such a tree with 8 internal nodes will be :
Q 29. A 5-ary tree is tree in which every internal node has exactly 5 children. The number of
(1) 30
(2) 33
(3) 45
(4) 125
Answer: (2) 33
In a complete n-ary tree,L=(n−1)∗I+1 where L = No. of leaves, I = No. of Internel nodes
Here n = 5, I = 8
Therefore, L = (5-1) * 8 + 1 = 4 * 8 + 1 = 33
In graph theory, a k-ary tree is a rooted tree in which each node has no more than k children. It is also sometimes known as a k-way tree, an N-ary tree, or an M-ary tree. A binary tree is the special case where k=2.
Answer: (2) 33
In a complete n-ary tree,
Here n = 5, I = 8
Therefore, L = (5-1) * 8 + 1 = 4 * 8 + 1 = 33
In graph theory, a k-ary tree is a rooted tree in which each node has no more than k children. It is also sometimes known as a k-way tree, an N-ary tree, or an M-ary tree. A binary tree is the special case where k=2.
0 comments:
Post a Comment