Let G be an edge-weighted undirected graph with positive edge weights. Suppose a positive constant α 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 G before and after the edge weight update?
Correct Answer :
Every MST remains an MST, and SPs need not remain SPs
Solution :
The correct option is: Every MST remains an MST, and SPs need not remain SPs.
Let us understand why this statement is true by analyzing the effect of adding a positive constant to the weight of every edge on Minimum Spanning Trees (MSTs) and Shortest Paths (SPs) separately.
1. Effect on Minimum Spanning Trees (MSTs):
Let be a connected undirected graph with vertices.
Any spanning tree of must contain exactly edges.
Let be the original weight of edge , and let the new weight be .
The total weight of a spanning tree under the new weight function is:
Since there are exactly edges in , this simplifies to:
Here, is a constant value added to the total weight of every spanning tree in the graph. Since the weights of all spanning trees are shifted by the exact same constant, the relative ordering of their weights does not change. Thus, any tree that minimized the original weight will also minimize the updated weight . Therefore, every MST remains an MST.
2. Effect on Shortest Paths (SPs):
Let be a path between two vertices and . The number of edges in (path length in terms of edges) can vary. Let be the number of edges in .
Under the new weight function, the total weight of path becomes:
Since paths between two vertices can have different numbers of edges, adding to every edge penalizes paths with more edges more heavily than paths with fewer edges. Consequently, the relative ranking of path weights can change, and a path that was previously the shortest may no longer be so.
For example, consider a graph with two vertices and connected by two alternative paths:
- Path has 1 edge of weight 4.
- Path has 2 edges of weights 1.5 and 2 (total original weight = 3.5).
Originally, is the shortest path since .
Now, add to every edge weight:
- New weight of = .
- New weight of = .
After the update, becomes the shortest path (). Thus, shortest paths need not remain shortest paths.
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Mindyard. Perfect for teachers and institutes.
Copyright © 2026 Mindyard. All Rights Reserved.