Dijkstra's Algorithm
Problem
4:
Give an example of a graph with negative weights for which Dijkstra's
algorithm gives an incorrect answer.
Problem
5:
Suppose line 2 is replaced with
Equation
5
How many times will the while-loop be executed with this new
condition? Will the algorithm still be correct?
|