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

1 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!