GATE / CS ARCHIVE

GATE CSE 2014 SET 3 / QUESTION 51

GATE CSE 2014 Set 3 Q51

Discrete Mathematics · Trees & Connectivity · Full GATE CSE 2014 Set 3 paper

GATE 2014 Set 3, Q51 2 marks · MCQ
Report issue

Trees & Connectivity

Question 51, GATE 2014: A forest G has n vertices and k connected components. How many edges does it contain? A floor(n/k); B ceil(n/k); C n−k; D n−k+1.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step 1: Each connected component of a forest is a tree. A tree with vi vertices contains vi−1 edges, including a one-vertex component with zero edges. Step 2: Sum across the k components: E=Σ(vi−1)=Σvi−k=n−k. Step 3: Thus C is correct. The quotient n/k concerns an average component size, not the total edge count; the extra +1 in D would already fail for a single tree.

Original paper, page 65 · Answer key