A2 June 2023 Q3

EdexcelCurrent spec8 marksAlgorithmsShortest Path

3.

Figure 4: network on A to J with edges AB 23, AC 35, AD 41, BC 8, BE 42, BG 37, CD 7, CE 30, CG 28, CH 45, CF 43, DF 34, DH 32, EG 21, EH 7, EJ 50, FG 11, FH 22, GH 10, HJ 32
Figure 4

Figure 4 represents a network with nodes, A, B, C, D, E, F, G, H and J.

The number on each edge gives the length of the corresponding edge.

(a)
(i) Use Dijkstra’s algorithm to find the shortest path from A to J.
(ii) State the length of the shortest path from A to J. (6)

One application of Dijkstra’s algorithm has order \(n^2\), where \(n\) is the number of nodes in the network.

It takes a computer 0.0312 seconds to find the shortest path from a given start node to a given end node in a network of 9 nodes.

(b) Calculate approximately how long it would take, in minutes, for the computer to find the shortest path from a given start node to a given end node for a network of 9000 nodes. (2)