edited by
25,865 views
57 votes
57 votes

In a binary tree, the number of internal nodes of degree $1$ is $5$, and the number of internal nodes of degree $2$ is $10$. The number of leaf nodes in the binary tree is

  1. $10$
  2. $11$
  3. $12$
  4. $15$
edited by

11 Answers

0 votes
0 votes

Given n1=5, n2= 10, n0=?

Total nodes N= n0+n1+n2

N=n0+15 = Edges -1

Edges= n0*0+n1*1+n2*2

N-1= n1+2n2

15+n0-1= n1+2n2

On solving we get n0= 11

Hence Option B) is correct answer

0 votes
0 votes

 

@Shaik Masthan @Arjun Sir can we apply here 

x*1 + 5 *2 + 10*3  -1 = 2* (x+5+10 - 1)     (considering degree as no of incident edges , sum of degree=2 |E| )

x= 39-28  = 11  (ans)                             x is no of leaf nodes.. 1 subtracted as root have only 2 incident edges

It's giving right answer

but is it conceptually correct??

edited by
0 votes
0 votes
NO.of leaf=no.of internal node(degree=2)+1

while this formula is basically applied in case of complete binary tree but  we can apply here too (there will be no effect of nodes of degree 1)

 so,no.of leaf=10+1=11
0 votes
0 votes

if we analyse a binary tree there is a connection between nodes of degree 2 and leaves 

e.g

1 node of degree 2  => 2 leaves

2 nodes of degree 2 => 3 leaves

in general n nodes of degree  2   =>    n+1 leaves

NOTE:here degree is considered as out degree only.

so for above question there are 10 nodes of degree 2=>10+1=11 leaves 

option (B)

Answer:

Related questions