The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
141 views

UGCNET-DEC2018-II-26.8

  1. UGCNET-DEC2018-II-130
  2. UGCNET-DEC2018-II-130
  3. UGCNET-DEC2018-II-130
  4. UGCNET-DEC2018-II-130

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 by Veteran (418k points)
edited by | 141 views
0
can also be answered by making a tree  ans 10

1 Answer

+2 votes

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)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,093 questions
55,327 answers
190,852 comments
86,254 users