October 10, 2023
October 10, 2023
October 10, 2023
###### Nielit Scentist-B [02-12-2018]
October 10, 2023
 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/
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/