GATE / CS ARCHIVE

GATE CSE 2017 SET 1 / QUESTION 26

GATE CSE 2017 Set 1 Q26

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

GATE 2017 Set 1, Q26 2 marks · MCQ
Report issue

Graph Algorithms

Question 26, GATE 2017: In any connected undirected graph with positive distinct edge weights, are these necessarily true? I the minimum spanning tree is unique; II the shortest path between any two vertices is unique. A I only; B II only; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

1. For uniqueness of the MST, suppose two different minimum trees exist. Select the lightest edge in their symmetric difference and add it to the tree not containing it.

2. The resulting cycle has an edge belonging to that tree but not the other. This edge is heavier because weights are distinct and the chosen edge was lightest in the difference. Exchanging them strictly reduces weight, contradicting minimality. Thus I is true.

3. Distinct edge weights do not make path sums distinct. In a triangle with weights 1,2,3 the direct weight-3 edge ties the 1+2 route. II fails, so A.

Original paper, page 13 · Answer key