Prove Dijkstra processes vertices in non-decreasing distance
Analyze the prove dijkstra processes vertices in non-decreasing distance.
Examples
Input: "proof_case_1"
Output: true
Input: "proof_case_2"
Output: true
Hints
Consider how Dijkstra's algorithm maintains a priority queue of vertices to process next, and how it selects the next vertex to process based on the current shortest distance estimates.
Recall that once a vertex is extracted from the priority queue, its shortest distance is finalized. Analyze why this ensures that no subsequent vertex can have a shorter distance than the current one.
Prove by contradiction: Assume there exists a vertex processed later with a shorter distance than a previously processed vertex, and show how this violates the properties of Dijkstra's algorithm or the priority queue.
Prove Dijkstra processes vertices in non-decreasing distance
Analyze the prove dijkstra processes vertices in non-decreasing distance.