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  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 ...
Concept:

  • Minimum spanning tree - A minimum spanning tree (MST) is a tree that connects all the vertices in a graph with the smallest possible total edge weight.

  • Shortest path - The shortest path between two vertices in a graph is the path with the minimum total weight among all possible paths between the vertices.



Explanation:

  • P is true: If we increase the weight of every edge in a graph by the same value, the relative weights of the edges do not change. Therefore, the order of the edges in the sorted list of edges does not change, and the minimum spanning tree (MST) remains the same.

  • Q is false: If we increase the weight of every edge in a graph by the same value, the shortest path between two vertices may change. For example, consider a graph with three vertices connected by edges with weights 1, 2, and 3. The shortest path between vertices A and C is A-B-C with weight 3. If we increase the weights of all edges by 1, the shortest path between A and C becomes A-C with weight 5.



Answer: The correct option is (a) P only.
Free Test
Community Answer
Let G be a weighted connected undirected graph with distinct positive ...

Here is a counter example . See the path from S to U . Initially  , the shortest path was ST and TU . On adding 2 to the weights , the shortest path is SU.

But the MST does not change.
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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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 does not change.Q: Shortest path between any pair of vertices does not change.a)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