Govur University Logo
--> --> --> -->
...

When using Dijkstra’s algorithm, why does the presence of negative edge weights invalidate the greedy assumption used to finalize a node's shortest path distance?



Dijkstra’s algorithm operates on the greedy assumption that once a node is marked as visited, its current distance estimate is the absolute shortest path from the source. This assumption relies on the principle that adding edges to a path will only ever increase the total path cost or keep it the same, never decrease it. When all edge weights are non-negative, any path extending from a visited node will have a co....

Log in to view the answer



Redundant Elements