GATE / CS ARCHIVE

GATE CSE 2010 / QUESTION 50

Minimum spanning tree with a prescribed leaf

Algorithms · Graph Algorithms · Full GATE CSE 2010 paper

GATE 2010, Q50 2 marks · MCQ
Report issue

Graph Algorithms

Question 50, GATE 2010: A complete undirected graph has vertices 0,1,2,3,4 and symmetric weight matrix W, with rows/columns in that order: [[0,1,8,1,4],[1,0,12,4,9],[8,12,0,7,3],[1,4,7,0,2],[4,9,3,2,0]]. What is the minimum weight of a spanning tree in which vertex 0 is a leaf?
Options: (A) 7; (B) 8; (C) 9; (D) 10.
Question 50, GATE 2010: A complete undirected graph has vertices 0,1,2,3,4 and symmetric weight matrix W, with rows/columns in that order: [[0,1,8,1,4],[1,0,12,4,9],[8,12,0,7,3],[1,4,7,0,2],[4,9,3,2,0]]. What is the minimum weight of a spanning tree in which vertex 0 is a leaf?
Options: (A) 7; (B) 8; (C) 9; (D) 10.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step through it (6 steps)

If vertex 0 is a leaf, removing it leaves a spanning tree on {1,2,3,4}; conversely any such tree plus one edge incident on 0 is feasible. Kruskal on the induced four-vertex graph chooses (3,4) of weight 2, (2,4) of weight 3, and (1,3) of weight 4, totaling 9. The cheapest edge from 0 has weight 1, either (0,1) or (0,3), hence the constrained minimum is 9+1=10, D. The unconstrained MST need not satisfy the leaf requirement.

The leaf constraint permits exactly one edge incident to 0. Therefore 0 cannot serve as a cheap connector joining vertices 1 and 3 through two weight-one edges. On vertices 1,2,3,4, the sorted edges begin 3–4:2, 2–4:3, 1–3:4; these three create no cycle and already connect all four vertices, proving the induced-tree minimum of 9.

Original paper, page 12