Question: Q4. (10 points) Given a directed graph G with possibly negative edge weights. Consider the following algorithm to find the shortest paths from a source

Q4. (10 points) Given a directed graph G with possibly negative edge weights. Consider the following algorithm to find the shortest paths from a source vertex to all other vertices. Pick some large constant c, and add it to the weight of each edge, so that there are no negative weights. Now, just run Dijkstra's algorithm to find all the shortest paths. Is this method correct? If yes, reason why. If not, give a counterexample
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
