Skip to content
Official PYQ · 2005

GATE CS 2005 Q82b — 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.

Let the weight of an edge ee denote the congestion on that edge. The congestion on a path is defined to be the maximum of the congestions on the edges of the path. We wish to find the path from ss to tt having minimum congestion. Which of the following paths is always such a path of minimum congestion?

Choose one option
View worked solution

Answer: A

This problem asks us to find a path between ss and tt that minimizes the maximum edge weight on the path. This is known as the bottleneck shortest path or minimax path problem.

Proof using the Cut Property of MSTs

Let TT be the Minimum Spanning Tree (MST) of the graph GG. Since the edge weights are distinct, TT is unique. Let PTP_T be the unique path between ss and tt in TT.

  1. Let e=(u,v)e = (u, v) be the edge on PTP_T with the maximum weight. Thus, the congestion of PTP_T is w(e)w(e).
  2. Removing the edge ee from TT partitions the vertices of TT (and hence GG) into two disjoint sets, XX and YY, such that s∈Xs \in X and t∈Yt \in Y.
  3. By the cut property of MSTs, the edge ee must be the minimum-weight edge in GG that crosses the cut [X,Y][X, Y]. That is, for any other edge e′e' crossing [X,Y][X, Y], we have: w(e′)>w(e)w(e') > w(e)
  4. Any path PP from ss to tt in GG must cross the cut [X,Y][X, Y] at least once. Therefore, PP must contain at least one edge e′e' that has one endpoint in XX and the other in YY.
  5. The maximum edge weight (congestion) on PP is at least w(e′)w(e'). Since w(e′)≥w(e)w(e') \ge w(e), the congestion of PP is at least w(e)w(e).

Thus, no path from ss to tt can have a smaller congestion than the path PTP_T in the MST.

Why other options are incorrect:

  • Option B (Weighted shortest path): Minimizes the sum of edge weights, which does not necessarily minimize the maximum single edge weight. For example, a path with edges of weights {4,4}\{4, 4\} (sum =8= 8, max =4= 4) might be chosen over a single-edge path of weight {5}\{5\} (sum =5= 5, max =5= 5) by a bottleneck algorithm, but a shortest path algorithm would choose the path of weight 55.
  • Options C and D: Euler walks and Hamiltonian paths do not always exist in a graph, and even when they do, they do not minimize the bottleneck edge weight.

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

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