Question

Let G=(V,E)G = (V, E) be any connected undirected edge-weighted graph. The weights of the edges in EE are positive and distinct. Consider the following statements:

(I) Minimum Spanning Tree of GG is always unique.
(II) Shortest path between any two vertices of GG is always unique.

Which of the above statements is/are necessarily true?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2017 answer key

Solution

Analyze the uniqueness of Minimum Spanning Trees and Shortest Paths in graphs with distinct positive edge weights.

Statement (I): In any connected undirected graph where all edge weights are distinct, the Minimum Spanning Tree (MST) is unique.
Proof: Suppose there are two distinct MSTs, T1T_1 and T2T_2. Let ee be the minimum weight edge that belongs to one tree but not the other, say e∈T1∖T2e \in T_1 \setminus T_2. Adding ee to T2T_2 creates a cycle CC. There must be an edge e′∈Ce' \in C that is not in T1T_1. Since all edge weights are distinct and ee is the minimum such edge, w(e′)>w(e)w(e') > w(e). Replacing e′e' with ee in T2T_2 produces a spanning tree of strictly smaller weight than T2T_2, contradicting the assumption that T2T_2 was an MST. Hence, the MST is always unique. Statement (I) is necessarily true.

Statement (II): Distinct positive edge weights do not guarantee that the shortest path between every pair of vertices is unique.
Counterexample: Consider a graph with vertices {u,v,x,y}\{u, v, x, y\} and distinct edge weights:

  • w(u,x)=1w(u, x) = 1, w(x,v)=4w(x, v) = 4
  • w(u,y)=2w(u, y) = 2, w(y,v)=3w(y, v) = 3
    All four edge weights are positive and distinct (1, 2, 3, 4). The path u−x−vu - x - v has length 1+4=51 + 4 = 5, and the path u−y−vu - y - v has length 2+3=52 + 3 = 5. Both paths between uu and vv have the exact same shortest distance 5, so the shortest path is not unique. Hence, Statement (II) is not necessarily true.

Therefore, only Statement (I) is necessarily true.

Final answer

A

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2017 Computer Science and Information Technology (CS) Session 1
Question
26 of 65, printed as CS Q.26
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.