Operating-Systems
October 10, 2023
Nielit Scentist-B [02-12-2018]
October 10, 2023
Operating-Systems
October 10, 2023
Nielit Scentist-B [02-12-2018]
October 10, 2023

Nielit Scentist-B [02-12-2018]

Question 2
___ number of leaf nodes in a rooted tree of n nodes, where each node is having 0 or 3 children.
A
n/2
B
(2n+1)/3
C
(n-1)/n
D
(n-1)
Question 2 Explanation: 
→ Any n-ary tree in which every node has either 0 or n children will take L=(n-1)*I +1
[ Where L is the number of leaf nodes and I is the number of internal nodes]
→ Given data n=3.
L=(3-1)I +1
=2I +1 ————> 1
→ To find total number of nodes is nothing but sum of leaf nodes and internal nodes
n=L+I ————> 2
With the help of 1 and 2, we get L =(2n+1)/3/
Correct Answer: B
Question 2 Explanation: 
→ Any n-ary tree in which every node has either 0 or n children will take L=(n-1)*I +1
[ Where L is the number of leaf nodes and I is the number of internal nodes]
→ Given data n=3.
L=(3-1)I +1
=2I +1 ————> 1
→ To find total number of nodes is nothing but sum of leaf nodes and internal nodes
n=L+I ————> 2
With the help of 1 and 2, we get L =(2n+1)/3/
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!