# Understanding Dijkstra Completely: Why Does Picking the Nearest Point Each Time Still Find the Globally Shortest Path?

- Source: 深蓝AI · 微信公众号
- Published: 2026-10-31T01:48:00.000Z
- RoboHot: https://robohot.news/en/items/ky8isczqxitdurmtfghf6oys7
- Original: https://mp.weixin.qq.com/s?__biz=MzY4NjA5NTgyMQ==&mid=2247606092&idx=1&sn=698f5384238f1971361e5d5fec6629a2&chksm=f24bcbf929776ad0d1773bffc799514938e714291f99e78a808cf0236aab0d4aa18a7df6f5e4&scene=126&sessionid=1793453433#rd

## Summary

In each round, Dijkstra selects the node with the smallest cumulative cost from the source among the nodes not yet finalized and formally finalizes it, then performs relaxation updates on its neighbors; under the premise of non-negative edge weights, this guarantees the globally shortest path. If negative-weight edges exist, a finalized node may be overturned by a cheaper route, so standard Dijkstra no longer guarantees correctness, and algorithms such as Bellman-Ford must be used instead.
