Dijkstra’s Algorithm – The Closest Look
Chapter 20 introduced Dijkstra’s algorithm. Here, we take a closer look at its workings, picking up the example we’ve been using of the airline flight plan. We use the algorithm to first determine the shortest among the links directly connected to the origin, so as to find the destination closest to it. Then we determine the shortest of the remaining links, as well as those directly connected to the previously identified closest destination, thereby finding the next closest destination. This process is continued until all the destinations and links are identified. It a process that makes solving the puzzle easier and faster.