Dark Mode

91 votes

Best answer

A node in a binary tree has degree $0, 1$ or $2$.

Ref: http://faculty.cs.niu.edu/~mcmahon/CS241/Notes/bintree.html

We are given no. of $1$ degree node $= 5$, no. of $2$ degree nodes $= 10$.

Total no. of edges $= 1*5 + 2*10 = 25$ (In tree degree is for outgoing edges only, and hence each degree corresponds to an edge)

So, total no. of nodes $= 25 + 1 = 26$ (No. of nodes in a tree is $1$ more than no. of edges).

Now, no. of leaf nodes (nodes with $0$ degree) $= 26 - 5 - 10 = 11$.

Correct Answer: $B$

@ dharmesh7 see this "A binary tree is a directed graph and hence degree refers to outgoing degree only. We can also consider it as an undirected graph and apply graph rules- but by default it is a directed graph. " by arjun sir

0

0

56 votes

In a binary Tree,

no of nodes of degree 2 = no of leaves - 1.

No of nodes of degree 1 do not affect no of leaves !

No of leafs = No of nodes of degree 2 + 1 = 10 + 1 = 11

no of nodes of degree 2 = no of leaves - 1.

No of nodes of degree 1 do not affect no of leaves !

No of leafs = No of nodes of degree 2 + 1 = 10 + 1 = 11

@arjun Sir

@gatecse

A binary tree is a directed graph and hence degree refers to outgoing degree only. We can also consider it as an undirected graph and apply graph rules- but by default it is a directed graph.

Why this definition is not using in this: https://gateoverflow.in/118300/gate2017-1-20

1

val because in GATE2006 question we are using the definition of a tree defined in **DATA STRUCTURES **but in GATE2017 we are using the definition of a tree as a graph defined in **GRAPH THEORY**

**NOTE**: notice the word **10 vertices.**

0