Question: Suppose we (1) have a directed graph as, and (2) allow negative weights of edges in the input to Dijsktras algorithm. Question part 1: Demonstrate
Suppose we (1) have a directed graph as, and (2) allow negative weights of edges in the input to Dijsktra’s algorithm.
Question part 1: Demonstrate a graph with these two properties, such as Dijkstra’s algorithm from class returns an incorrect output. Explain what the correct output is, what output Dijkstra’s algorithm produces, and why.
Question part 2: Which of the above two properties causes the algorithm to fail?
Question part 3: Show exactly where our proof of correctness of Dijkstra’s algorithm fails if we allow the property in your previous answer.
Step by Step Solution
3.30 Rating (147 Votes )
There are 3 Steps involved in it
Question Part 1 Lets consider a graph that has both negative edge weights and allows Dijkstras algorithm to produce an incorrect output Heres a simple ... View full answer
Get step-by-step solutions from verified subject matter experts
