GATE / CS ARCHIVE

GATE CSE 2012 / QUESTION 29

Squaring edge weights and minimum spanning trees

Algorithms · Graph Algorithms · Full GATE CSE 2012 paper

GATE 2012, Q29 2 marks · MCQ
Report issue

Graph Algorithms

Question 29, GATE 2012: Let G be a weighted graph with edge weights greater than one and G′ be the graph constructed by
        squaring the weights of edges in G. Let T and T′ be the minimum spanning trees of G and G′,
        respectively, with total weights t and t′. Which of the following statements is TRUE?
        (A) T′ = T with total weight t′ = t²
        (B) T′ = T with total weight t′ < t²
        (C) T′ ≠ T but total weight t′ = t²
        (D) None of the above
Tap to enlarge
Your answer
Answer & solution

Official answer: Marks to All

Our answer: B under additional uniqueness and size assumptions

Squaring positive weights preserves every pairwise edge order and equality. Consequently it preserves the set of minimum spanning trees: any chosen MST of G remains an MST of G′, although independently chosen T and T′ can differ if the MST is not unique. For a fixed spanning tree with edge weights wi, its new weight is Σwi², while t²=Σwi²+2Σ_{i<j}w_iw_j. With at least two edges this gives t′<t²; with one edge there is equality. Thus B describes a consistent common choice of tree on at least three vertices, but the unqualified statement T′=T need not hold when multiple MSTs exist, and small graphs also matter. The official entry is Marks to All. These are independent qualifications, not a claimed official cancellation rationale.

Check: For an explicit nonuniqueness example, give every edge of a triangle weight 2. Any two edges form an MST, before and after squaring. T and T′ can therefore be chosen differently even though the collection of optimal trees is unchanged.

Original paper, page 6 · Answer key