141 views 1. 2. 3. 4. In a ternary tree, the number of internal nodes of degree $1, 2,$ and $3$ is $4, 3$, and $3$ respectively. The number of leaf nodes in the ternary tree is

1. $9$
2. $10$
3. $11$
4. $12$
in Others
edited | 141 views
0
can also be answered by making a tree  ans 10

By seeing the degree's of nodes, i understood TREE assumed as Directed graph.

Let N$_i$ represent Number of Nodes with Degree i

Total No.of Nodes in a Tree = N$_0$ + N$_1$ + N$_2$ + N$_3$

In a tree with N nodes have exactly n-1 edges.

∴ N = |E| + 1 ==> N$_0$ + N$_1$ + N$_2$ + N$_3$ = |E| + 1  --------- (1)

Given that, N$_1$ = 4 , N$_2$ = 3 ,  N$_3$ = 3

Total Edges in the directed graph = summation of all degrees = ∑ N$_i$ . i

∴ | E | = ( 0*N$_0$) + (1*N$_0$) + (2*N$_2$) + (3*N$_3$) = ( 0*$\color{red}?$) + (1*4) + (2*3) + (3*3) = 0+4+6+9 = 19

Substitute this value in eqn (1),

N$_0$ + N$_1$ + N$_2$ + N$_3$ = 19 + 1

N$_0$ + 4+3+3 = 19+1 ===> N$_0$ + 10 = 20 ===> N$_0$ = 10

by Veteran (62.5k points)

+1 vote