Question

Let GG be an edge-weighted undirected graph with positive edge weights. Suppose a positive constant α\alpha is added to the weight of every edge.

Which ONE of the following statements is TRUE about the minimum spanning trees (MSTs) and shortest paths (SPs) in GG before and after the edge weight update?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2025 answer key

Solution

Compare how adding α\alpha to each edge changes the cost of spanning trees (fixed number of edges ∣V∣−1|V|-1) versus paths (variable number of edges).

  1. Minimum Spanning Trees: Every spanning tree of a connected graph G=(V,E)G = (V, E) has exactly ∣V∣−1|V| - 1 edges. Adding α>0\alpha > 0 to every edge increases the total weight of every spanning tree by the same constant (∣V∣−1)α(|V| - 1)\alpha (and preserves the relative order of all edge weights). Therefore, every MST remains an MST.
  2. Shortest Paths: Two paths between uu and vv may contain different numbers of edges. For example, if a 2-edge path has weights 1+1=21 + 1 = 2 and a 1-edge path has weight 33, adding α=2\alpha = 2 changes their weights to (1+2)+(1+2)=6(1+2)+(1+2) = 6 and 3+2=53+2 = 5, changing the shortest path. Thus SPs need not remain SPs.
Final answer

Option (C)

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

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
Question
37 of 65
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.