GATE / CS ARCHIVE

GATE CSE 2015 SET 1 / QUESTION 63

GATE CSE 2015 Set 1 Q63

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

GATE 2015 Set 1, Q63 2 marks · NAT
Report issue

Graph Algorithms

Question 63, GATE 2015: Graph vertices A,B,C,D,E,F; edges AB,AC,BC,BE,CD,DE,DF,EF. All eight weights are distinct integers. Its MST has weight 36 and edges AC=9,BC=2,BE=15,EF=4,DF=6. Find the minimum total of all eight edges.
Tap to enlarge
Answer & solution

Official answer: 69

Adding a non-tree edge creates one cycle. If its weight were below the largest edge on that tree path, replacing that tree edge would give a lighter spanning tree. Distinctness forces a strict inequality. AB's path maximum is 9, CD's is 15, and DE's is 6, so their least integer choices are 10,16,7. These choices do not clash with any existing weight. The cycle conditions are also sufficient to preserve this MST, establishing attainability, not merely a lower bound. Total is 36+33=69.

Solution: For a tree to remain the MST with distinct weights, every non-tree edge must be heavier than the maximum edge on its tree path. AB must exceed max(AC9, CB2)=9, so at least 10. CD must exceed max(CB2, BE15, EF4, FD6)=15, so at least 16. DE must exceed max(DF6, FE4)=6, so at least 7. Values10, 16, 7 are mutually distinct and different from the given tree weights, and satisfy all cycle conditions. Minimum total is 36+10+16+7=69.

Original paper, page 24 · Answer key