136k views
3 votes
Which strategy is used to prove correctness of Dijkstra's algorithm?

a) Structural bound
b) An exchange argument
c) Greedy stays ahead
d) Proof by counterexample

User MaryBaker
by
8.7k points

1 Answer

2 votes

Final answer:

To prove the correctness of Dijkstra's algorithm, the 'Greedy stays ahead' strategy is employed, demonstrating that local optimum choices lead to a global optimum solution for finding the shortest path.

Step-by-step explanation:

The strategy used to prove the correctness of Dijkstra's algorithm is c) Greedy stays ahead. This strategy involves showing that at each step, Dijkstra's algorithm makes a choice that is as good as or better than any other algorithm up to that point.

In other words, by locally making the best choice (choosing the edge with the smallest weight that adds the next vertex to the growing shortest-path tree), the algorithm ensures that the global optimum is achieved, which is the shortest path from a source vertex to all other vertices in the graph with non-negative edge weights.

User Rogerio Azevedo
by
8.6k points