Question: Problem 6. Dijkstra's algorithm does not generally work for graphs with negative weights. Consider the following modification: determine the lowest weight win of any edge

Problem 6. Dijkstra's algorithm does not generally work for graphs with negative weights. Consider the following modification: determine the lowest weight win of any edge in the graph, add the absolute value of that weight lwmin to all edges' weights, then run Dijkstra, and finally subtract |wmin again to adjust the weights of the computed shortest paths Show that this modification does not work. Give an example of a graph G for which this modified version of Dijkstra's algorithm computes at least one incorrect shortest path and point out a pair of vertices along with the incorrectly computed path and a correct path
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
