Single source shortest paths (with attitude)
This post explores single source shortest paths algorithms, specifically Bellman-Ford, Dijkstra, and finding the shortest path on a DAG.
This post explores single source shortest paths algorithms, specifically Bellman-Ford, Dijkstra, and finding the shortest path on a DAG.
Dijkstra's argument that numbering should start at zero begins with an analysis of a subsequence of natural numbers, namely , and what interval notation should be preferred most to denote this sequence. Exploring his argument in more detail allows for greater understanding as to why the half-interval notation is to be preferred in a variety of programming contexts (e.g., implementing sliding windows).