Computer Sciences > Gate 2016 Set-1 > Graph Theory
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
A
P only
B
Q only
C
Both P and Q
D
Neither P nor Q

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

Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time on Depth First Search of G? Assume that the graph is represen...
#14 MCQ
Let G=(V,E) be a directed graph where V is the set of vertices and E the set of edges. Then which one of the following graphs has the same strongly connected co...
#18 MCQ
In an adjacency list representation of an undirected simple graph G = (V, E), each edge (u, v) has two adjacency list entries: [v] in the adjacency list of u, a...
#91 MCQ

Related Topics

Minimum Spanning Tree Shortest Path Graph theory GATE Computer Sciences 2016 MST edge weight change Shortest path edge weight change Weighted graph algorithms GATE CS 2016 Set-1 Q24

Unique Visitor Count

Total Unique Visitors

Loading......