A2 October 2021 Q4

EdexcelCurrent spec8 marksRoute InspectionShortest Path

4.

Figure 3: network on A, B, C, D, E and F with arcs AB 57, AC 95, AD 150, AE 63, AF 230, BC 72, BE 132, CD 289, CE 160, CF 125, DE 84, EF 191
Figure 3

[The total weight of the network is 1648]

Direct roads between six cities, A, B, C, D, E and F, are represented in Figure 3. The weight on each arc is the time, in minutes, required to travel along the corresponding road.

Floyd’s algorithm is to be used to find the complete network of shortest times between the six cities.

An initial route matrix is given in the answer book.

Initial route matrix (answer book)

ABCDEF
AABCDEF
BABCDEF
CABCDEF
DABCDEF
EABCDEF
FABCDEF
(a) Set up the initial time matrix. (1)
(b) Perform the first iteration of Floyd’s algorithm. You should show the time and route matrices after this iteration. (2)

The final time matrix after completion of Floyd’s algorithm is shown below.

ABCDEF
A–579514763220
B57–72204120197
C9572–242158125
D147204242–84275
E6312015884–191
F220197125275191–

A route is needed that minimises the total time taken to traverse each road at least once.

The route must start at B and finish at E.

(c) Use an appropriate algorithm to find the roads that will need to be traversed twice. You should make your method and working clear. (4)
(d) Write down the length of the route. (1)