Skip to content
Official PYQ · 2005

GATE CS 2005 Q82a — Graph Traversals (BFS, DFS)

Explain with AI

Let ss and tt be two vertices in a undirected graph G=(V,E)G=(V,E) having distinct positive edge weights. Let [X,Y][X,Y] be a partition of VV such that s∈Xs \in X and t∈Yt \in Y. Consider the edge ee having the minimum  weight amongst all those edges that have one vertex in XX and one vertex in YY.

The edge ee must definitely belong to:

Choose one option
View worked solution

Answer: A

This question is a direct application of the Cut Property of Minimum Spanning Trees (MST).

1. The Cut Property of MSTs

For any undirected graph G=(V,E)G = (V, E) with distinct edge weights, let [X,Y][X, Y] be a partition (cut) of the vertex set VV. If ee is the unique edge of minimum weight that crosses the cut [X,Y][X, Y] (i.e., has one endpoint in XX and the other in YY), then ee must belong to the Minimum Spanning Tree (MST) of GG.

Since the graph has distinct positive edge weights, the minimum weight edge ee crossing the cut [X,Y][X, Y] is unique. Therefore, by the Cut Property, ee must definitely belong to the MST of GG. This makes Option A correct.

2. Eliminating Other Options

  • Option B (Weighted shortest path from ss to tt): Consider a graph with vertices V={s,a,b,t}V = \{s, a, b, t\} partitioned into X={s,a}X = \{s, a\} and Y={b,t}Y = \{b, t\}. Let the edges and weights be:
    • (s,b)(s, b) with weight 1010 (crosses cut)
    • (a,t)(a, t) with weight 100100 (crosses cut)
    • (a,b)(a, b) with weight 11 (crosses cut, minimum weight edge ee)
    • (s,a)(s, a) with weight 100100
    • (b,t)(b, t) with weight 100100
    The minimum weight edge crossing the cut is e=(a,b)e = (a, b) with weight 11. However, the shortest path from ss to tt is s→b→ts \to b \to t with a total cost of 110110, which does not contain e=(a,b)e = (a, b). Thus, Option B is incorrect.
  • Option C (Each path from ss to tt): Any path from s∈Xs \in X to t∈Yt \in Y must cross the cut [X,Y][X, Y] at least once, but it can do so using any crossing edge, not necessarily the minimum weight edge ee. Thus, Option C is incorrect.
  • Option D (Weighted longest path from ss to tt): The longest path is unlikely to be forced to use the minimum weight edge. Thus, Option D is incorrect.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Graph Traversals (BFS, DFS) questions