GateAI
Graph Traversals, MSTs and Shortest Paths

GATE CSE 2017 Set 1 · Q26

MCQ2 marksEasy

Time

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?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) (I) only

Graph Traversals, MSTs and Shortest Paths
  • Statement (I) is TRUE: When all edge weights in a connected, undirected graph are distinct, the Minimum Spanning Tree (MST) is guaranteed to be unique. This is a fundamental property of MSTs (e.g., via the Cut or Cycle property).

  • Statement (II) is FALSE: Even if all individual edge weights are distinct and positive, two different paths between a pair of vertices can have the exact same total path weight. For example, consider a graph with 4 vertices u,v,w,zu, v, w, z where edge weights are e(u,v)=1e(u, v) = 1, e(v,z)=4e(v, z) = 4 (path length = 55) and e(u,w)=2e(u, w) = 2, e(w,z)=3e(w, z) = 3 (path length = 55). All edge weights are distinct ({1,2,3,4}\{1, 2, 3, 4\}), but the shortest path between uu and zz is not unique.

Therefore, only statement (I) is necessarily true, making (A) the correct option.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Graph Traversals, MSTs and Shortest Paths previous year question is Q26 of the GATE CSE 2017 Set 1 paper. Find more GATE CSE PYQs on Graph Traversals, MSTs and Shortest Paths in Algorithms, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Graph Traversals, MSTs and Shortest Paths PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Graph Traversals, MSTs and Shortest Paths in GATE CSE

Graph Traversals, MSTs and Shortest Paths has 7 GATE CSE PYQs across 7 papers from 2014 to 2025. This is the only 2-mark MCQ among them, and it is the only one in GATE CSE 2017 Set 1.

How GATE tests Graph Traversals, MSTs and Shortest Paths

More from GATE CSE 2017 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2017 Set 1 · Q26 · MCQ

Let G = (V, E) be *any* connected undirected edge-weighted graph. The weights of the edges in E are positive and distinct. Consider the following statements: (I) Minimum Spanning Tree of G is always unique. (II) Shortest path between any two vertices of G is always unique. Which of the above statements is/are necessarily true?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.