Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Let G be a weighted connected undirected grap... Start Learning for Free
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)
    Neither P nor Q
  • d)
    Both P and Q
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Let G be a weighted connected undirected graph with distinct positive ...
The shortest path may change. The reason is, there may be different number of edges in different paths from s to t. For example, let shortest path be of weight 15 and has 5 edges. Let there be another path with 2 edges and total weight 25. The weight of the shortest path is increased by 5*10 and becomes 15 + 50. Weight of the other path is increased by 2*10 and becomes 25 + 20. So the shortest path changes to the other path with weight as 45. The Minimum Spanning Tree doesn't change. Remember the Kruskal's algorithm where we sort the edges first. IF we increase all weights, then order of edges won't change.
View all questions of this test
Most Upvoted Answer
Let G be a weighted connected undirected graph with distinct positive ...
Explanation:

Let's assume that every edge weight is increased by the same value 'x'. Now we will analyze the impact of this increase on the minimum spanning tree and shortest path between any pair of vertices of the graph G.

P: Minimum spanning tree of G does not change

Minimum spanning tree (MST) is a tree that spans all the vertices of a connected undirected graph with the minimum possible total edge weight. Since the edge weights are increased by the same value 'x', the relative differences in their weights remain the same. This means that the edge with the minimum weight in the original graph G will still have the minimum weight in the modified graph. Therefore, the MST of the modified graph will have the same set of edges as the MST of the original graph. Hence, the statement P is TRUE.

Q: Shortest path between any pair of vertices does not change

Shortest path between any pair of vertices is the path with the minimum possible total edge weight. Since every edge weight is increased by the same value 'x', the relative differences in their weights remain the same. This means that the edge with the minimum weight in the original graph G will still have the minimum weight in the modified graph. Therefore, the shortest path between any pair of vertices in the modified graph will have the same set of edges as the shortest path in the original graph. Hence, the statement Q is also TRUE.

Therefore, the correct answer is option 'A' i.e., P only.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer?
Question Description
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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer?.
Solutions for 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice 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 changeQ: Shortest path between any pair of vertices does not changea)P onlyb)Q onlyc)Neither P nor Qd)Both P and QCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev