959 views
1 votes
1 votes

Let G be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is decreased by the same value (constraint is - keeping all edge positive all the time), then is it TRUE or FALSE?

Shortest path between any pair of vertices does not change?

1 Answer

Best answer
5 votes
5 votes

Shortest path between any pair of vertices may change.

Consider the following graph A,B,C,D 

Current shortest path between A and D is from A to D, which is 11 but if we reduce every edge weight by 2, the shortest path between A and D will be A->B->C->D which will be (1+2+3) = 6. 

selected by

Related questions

0 votes
0 votes
3 answers
2
iarnav asked Apr 29, 2018
1,595 views
Question 1) The shortest-path tree computed by Dijkstra's algorithm is necessarily an MST?Question2 ) Prim's algorithm works with negative weighted edges?
1 votes
1 votes
0 answers
4
Shivam Chauhan asked Nov 2, 2017
755 views
First statement is False because complexity will be O(E2).I think the second statement is true? But not sure