Dijkstra's algorithm
Page 1 of 1
Dijkstra's algorithm
Sharon is planning a road trip from Preston to York. Figure 2 shows the network of roads that she could take on her trip. The number on each arc is the length of the corresponding road in miles.
(a) Use Dijkstra’s algorithm to find the shortest route from Preston (P) to York (Y). State the shortest route and its length.
Sharon has a friend, John, who lives in Manchester (M). Sharon decides to travel from Preston to York via Manchester so she can visit John. She wishes to minimise the length of her route.
(b) State the new shortest route. Hence calculate the additional distance she must travel to visit John on this trip. You must make clear the numbers you use in your calculation.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|