UGC-NET Dec 2014 · Trees

MCQ · 2 marks · Problem PROG-DSTR-0046

A certain tree has two vertices of degree $4$, one vertex of degree $3$ and one vertex of degree $2$. If the other vertices have degree $1$, how many vertices are there in the graph ?
  1. A
    $5$
  2. B
    $n – 3$
  3. C
    $20$
  4. D
    $11$

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solution\[\boxed{\sum\deg v=2|E|=2(n-1)\ \text{for a tree}}\]Let there be \(x\) leaves, so \(n=4+x\).\[4+4+3+2+x=2(4+x-1)\ \Rightarrow\ 13+x=6+2x\ \Rightarrow\ x=7.\]\[n=4+7=11.\]Answer: D

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com