StreakPeaked· Practice

ExamsGATETechnical

Let G be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE? P: Minimum spanning tree of G does not change Q: Shortest path between any pair of vertices does not change

  1. P only
  2. Q only
  3. Neither P nor Q
  4. Both P and Q

Correct answer: P only

Solution

Adding a constant to every edge preserves the relative order of edge weights, so the MST is unchanged (P true). But shortest paths can change because a path with more edges accumulates more added constant, so Q is false. Answer: P only.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →