Q: Shortest path between any pair of vertices does not change
Correct : G
Given:
A weighted connected undirected graph G with distinct positive edge weights.
Every edge weight is increased by the same constant value, say c > 0.
Statement P: Minimum spanning tree (MST) of G does not change.
Statement Q: Shortest path between any pair of vertices does not change.
To find:
Which of the statements P and Q is/are TRUE.
Solution:
Let me check statement P first.
A spanning tree of a graph with V vertices always contains exactly V - 1 edges.
If the weight of each edge increases by c, the total weight of any spanning tree T increases by exactly (V - 1) ร c.
Let the original weight of a spanning tree be W(T).
The new weight becomes W'(T) = W(T) + (V - 1)c.
Since (V - 1)c is the same constant for all spanning trees, the tree that had the minimum weight originally will still have the minimum weight.
Alternatively, by Kruskal's algorithm, adding a positive constant c preserves the relative order of edge weights, so the algorithm picks the exact same edges.
So, statement P is TRUE.
Now let me check statement Q with a simple counterexample.
Consider a graph with two vertices u and v connected by two different paths:
Path 1 has 2 edges, each of weight 3. Total weight of Path 1 = 3 + 3 = 6.
Path 2 has 1 edge of weight 7. Total weight of Path 2 = 7.
Originally, Path 1 is the shortest path between u and v because 6 < 7.<br>
Now, let me increase each edge weight by c = 2.
New weight of Path 1 = (3 + 2) + (3 + 2) = 5 + 5 = 10.
New weight of Path 2 = 7 + 2 = 9.
Now, Path 2 is shorter than Path 1 since 9 < 10.<br>
The shortest path has changed because paths can have different numbers of edges, so longer paths in terms of hop count get penalized more.
So, statement Q is FALSE.
Therefore, only statement P is true.
Answer:
(A) P only
Similar Questions
Total Unique Visitors