GATE / CS ARCHIVE

GATE CSE 2011 / QUESTION 54

Minimum spanning tree of a banded weighted graph

Algorithms · Graph Algorithms · Full GATE CSE 2011 paper

GATE 2011, Q54 2 marks · MCQ
Report issue

Graph Algorithms

Question 54, GATE 2011: An undirected graph has vertices v1,...,vn for n>2. Vertices vi and vj are adjacent exactly when 0<abs(i-j)≤2, and that edge has weight i+j. (For n=4 the edges are 12:3,13:4,23:5,24:6,34:7.) What is its minimum spanning-tree weight?

(A) (11n²-5n)/12
(B) n²-n+1
(C) 6n-11
(D) 2n+1
Question 54, GATE 2011: An undirected graph has vertices v1,...,vn for n>2. Vertices vi and vj are adjacent exactly when 0<abs(i-j)≤2, and that edge has weight i+j. (For n=4 the edges are 12:3,13:4,23:5,24:6,34:7.) What is its minimum spanning-tree weight?

(A) (11n²-5n)/12
(B) n²-n+1
(C) 6n-11
(D) 2n+1
Tap to enlarge
Your answer
Answer & solution

Official answer: B

For each vertex vi with i≥3, its lightest incident edge is (vi−2, vi), with weight 2i−2. The edge (v1, v2), of weight 3, is likewise the unique lightest edge incident to v1 and to v2. By the cut property all these edges must belong to an MST. They form two parity chains joined by (v1, v2), so they are connected and contain exactly n−1 edges, hence already form a spanning tree. Its weight is 3+sum from i=3 to n of (2i−2)=3+2[(n−1)n/2−1]=n²−n+1, option B.

For vertex vi with i≥3, possible smaller neighbors are v(i-2) and v(i-1), of weights 2i-2 and 2i-1; larger neighbors have still greater weights. Thus its distance-two backward edge uniquely minimizes the cut separating vi from all other vertices. The cut property forces every such edge, and also v1-v2. The odd-index chain and even-index chain are internally connected and joined by that last edge, showing the forced edges are sufficient, not merely a lower bound on the optimum.

Original paper, page 15 · Answer key