GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 64

Making an edge mandatory in every MST

Algorithms · Graph Algorithms · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q64 2 marks · NAT
Report issue

Graph Algorithms

Question 64, GATE 2025: An undirected four-vertex graph has edges AB=7, AD=6, DC=8, BC=x, BD=1, AC=3. The crossing diagonals BD and AC are edges, not an extra intersection vertex. Find the largest integer x for which BC belongs to every minimum spanning tree.
Tap to enlarge
Answer & solution

Official answer: 5

Approach: Find a cut on which BC is uniquely cheapest, then test the equality boundary because “every MST” is stronger than “some MST”.
Consider cut {B,D}|{A,C}. Its crossing edges have weights BC=x, DA=6, BA=7 and DC=8. If x<6, BC is the unique lightest edge of this cut. By the cut property it must occur in every MST. In detail, any spanning tree omitting BC has another crossing edge on the path connecting B to C; adding BC and removing that heavier crossing edge lowers its weight, contradicting minimality.
At x=6, the tree {BD,AC,AD} has weight 1+3+6=10 and omits BC. The tree {BD,AC,BC} also has weight 10, and no spanning tree can have smaller weight than the three globally smallest edge weights, which sum to 10. Thus BC is no longer mandatory.
For x>6, BC is uniquely heaviest on cycle B-D-A-C-B, whose other weights are 1,6,3, so the cycle property excludes it from an MST. Therefore the required condition is x<6, and the largest integer is 5. Equality cannot be included just because a tie allows an MST containing BC.

Original paper, page 64 · Answer key