In a weighted graph, assume that the shortest path from a source ‘s’ to a destination ‘t’ is correctly calculated using a shortest path algorithm. Is the following statement true?

If we increase weight of every edge by 1, the shortest path always remains same.

**(A)** Yes

**(B)** No

**Answer:** **(B)** **Explanation:** See the following counterexample.

There are 4 edges s-a, a-b, b-t and s-t of wights 1, 1, 1 and 4 respectively. The shortest path from s to t is s-a, a-b, b-t. IF we increase weight of every edge by 1, the shortest path changes to s-t.

1 1 1 s-----a-----b-----t \ / \ / \______/ 4

## Recommended Posts:

- Algorithms | Graph Shortest Paths | Question 14
- Algorithms | Graph Shortest Paths | Question 2
- Algorithms | Graph Shortest Paths | Question 3
- Algorithms | Graph Shortest Paths | Question 4
- Algorithms | Graph Shortest Paths | Question 14
- Algorithms | Graph Shortest Paths | Question 7
- Algorithms | Graph Shortest Paths | Question 9
- Algorithms | Graph Shortest Paths | Question 10
- Algorithms | Graph Shortest Paths | Question 11
- Algorithms | Graph Shortest Paths | Question 12
- Algorithms | Graph Shortest Paths | Question 13
- Algorithms | Graph Shortest Paths | Question 14
- Algorithms | Graph Shortest Paths | Question 15
- Johnson’s algorithm for All-pairs shortest paths | Implementation
- Number of paths from source to destination in a directed acyclic graph
- Shortest path in a directed graph by Dijkstra’s algorithm
- Building an undirected graph and finding shortest path using Dictionaries in Python
- Shortest path in a complement graph
- Create a Graph by connecting divisors from N to M and find shortest path
- Algorithms | Graph Traversals | Question 1