2,128 views
2 2 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 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
Position:
Show:

Related questions

0 0 votes
0 0 answers
645
645 views
iarnav asked Apr 11, 2018
645 views
Time Complexity of Kruskal - O(mlogm + n.O(1) + m.logn)mlogm for sorting edges in increasing order.n.O(1) n UNIONS as we've n nodes in G and each takes O(1)m.logm F...
0 0 votes
3 3 answers
3.0k
3.0k views
iarnav asked Apr 29, 2018
3,022 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?
0 0 votes
1 answers 1 answer
1.0k
1.0k views
iarnav asked Apr 28, 2018
1,001 views
Original question - https://gateoverflow.in/204122/gate2018-47Consider the following undirected graph G:Choose a value for x that will minimize the number of minimum weig...
0 0 votes
1 answers 1 answer
910
910 views
iarnav asked Apr 23, 2018
910 views
A complete, undirected, weighted graph G is given on the vertex {0,1,…,n−1} for a fixed ‘n=4’. Draw the minimum spanning tree of G ifthe weight of the edge (u,v) is ∣u−v∣...