AS June 2018 Q1

EdexcelAS paperCurrent spec9 marksAlgorithmsShortest Path

1.

Figure 1: network on vertices A to J with arcs AB 3, AD 25, AI 12, BC 5, CD 14, CE 6, DE 7, EF 8, EG 16, IF 7, IJ 10, FG 9, GH 11, JH 23
Figure 1

Figure 1 represents a network of roads.
The number on each arc represents the time taken, in minutes, to drive along the corresponding road.

(a)
(i) Use Dijkstra’s algorithm to find the shortest time needed to travel from A to H.
(ii) State the quickest route. (6)

For a network with \(n\) vertices, Dijkstra’s algorithm has order \(n^2\)

(b) If it takes 1.5 seconds to run the algorithm when \(n = 250\), calculate approximately how long it will take, in seconds, to run the algorithm when \(n = 9500\). You should make your method and working clear. (2)
(c) Explain why your answer to part (b) is only an approximation. (1)