Shortest Path Algorithms (Edexcel A Level Further Maths: Decision 1): Exam Questions

Exam code: 9FM0

2 hours12 questions
1a
Sme Calculator
6 marks

Write your answer in the Answer Booklet (opens in a new tab).

q1-8fmo-27-june-2018

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.

(i) Use Dijkstra’s algorithm to find the shortest time needed to travel from A to H. 

(ii) State the quickest route. 

1b
Sme Calculator
2 marks

For a network with n vertices, Dijkstra’s algorithm has order n squared

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.

1c
Sme Calculator
1 mark

Explain why your answer to the previous part is only an approximation.

2a
Sme Calculator
2 marks
q3-fig-2-june-2019-9fm0-3d

Figure 2

The network in Figure 2 shows the direct roads linking five villages, A, B, C, D and E.
The number on each arc represents the length, in miles, of the corresponding road.
The roads from A to E and from C to B are one-way, as indicated by the arrows.

Complete the initial distance and route tables for the network provided in the answer book (opens in a new tab).

2b
Sme Calculator
5 marks

Write your answer in the Answer Book (opens in a new tab).

Perform the first three iterations of Floyd’s algorithm. You should show the distance table and the route table after each of the three iterations.

2c
Sme Calculator
3 marks

After five iterations of Floyd’s algorithm the final distance table and partially completed final route table are shown below.

Distance table

Route table

 

A

B

C

D

E

A

12

7

6

3

B

15

22

21

18

C

7

5

4

7

D

11

9

4

3

E

14

12

7

3

 

A

B

C

D

E

A

A

 

 

 

 

B

A

B

 

 

 

C

A

B

C

 

 

D

C

C

C

D

 

E

D

D

D

D

E

(i) Explain how the partially completed final route table can be used to find the shortest route from E to A.  

(ii) State this route. 

2d
Sme Calculator
4 marks

Mabintou decides to use the distance table to try to find the shortest cycle that passes through each vertex. Starting at D, she applies the nearest neighbour algorithm to the final distance table.

(i) State the cycle obtained using the nearest neighbour algorithm. 

(ii) State the length of this cycle. 

(iii) Interpret the cycle in terms of the actual villages visited.

(iv) Prove that Mabintou’s cycle is not optimal.

3a
Sme Calculator
2 marks

Write your answer in the Answer Booklet (opens in a new tab).

fig-2-november-2020-9fm0-3d

Figure 2

Direct roads between five villages, A, B, C, D and E, are shown in Figure 2. The weight on each arc is the time, in minutes, it takes to travel along the corresponding road. The road from D to C is one-way as indicated by the arrow on the corresponding arc.

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

Set up initial time and route matrices.

3b
Sme Calculator
4 marks

Write your answer in the Answer Booklet (opens in a new tab).

The matrices after two iterations of Floyd’s algorithm are shown below.

q3b-november-2020-9fm0-3d

Perform the next two iterations of Floyd’s algorithm that follow from the tables above. You should show the time and route matrices after each iteration.

3c
Sme Calculator
3 marks

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

Final time matrix

 

A

B

C

D

E

A

7

4

7

8

B

7

3

10

9

C

4

3

7

6

D

5

4

1

1

E

6

5

2

1

(i) Use the nearest neighbour algorithm, starting at A, to find a Hamiltonian cycle in the complete network of shortest times.

(ii) Find the time taken for this cycle.

(iii) Interpret the cycle in terms of the actual villages visited.

4a
Sme Calculator
2 marks
fig-4-november-2020-9fm0-3d

Figure 4

left square bracket T h e space t o t a l space w e i g h t space o f space t h e space n e t w o r k space i s space 320 space plus space x space plus space y right square bracket

State, with justification, whether the graph in Figure 4 is Eulerian, semi-Eulerian or neither.

4b
Sme Calculator
9 marks

Write your answer in the Answer Booklet (opens in a new tab).

The weights on the arcs in Figure 4 represent distances. The weight on arc EF is x where 12 space less than space x space less than space 26 and the weight on arc DG is y where 0 space less than space y space less than space 10

An inspection route of minimum length that traverses each arc at least once is found. The inspection route starts and finishes at straight A and has a length of 409

It is also given that the length of the shortest route from straight F to straight G via straight A is 140

Using appropriate algorithms, find the value of x and the value of y.

5a
Sme Calculator
1 mark
fig-2-oct-2021-8fm0-27

Figure 2

Dijkstra’s algorithm has been applied to the network in Figure 2.

A working value has only been replaced at a node if the new working value is smaller.

State the length of the shortest path from A to G.

5b
Sme Calculator
3 marks

Complete the table in the answer book (opens in a new tab) giving the weight of each arc listed. (Note that arc CE and arc EF are not in the table.)

5c
Sme Calculator
1 mark

State the shortest path from A to G.

5d
Sme Calculator
3 marks

It is now given that

  • when Prim’s algorithm, starting from A, is applied to the network, the order in which the arcs are added to the tree is AB, BC, CD, CE, EF and FG

  • the weight of the corresponding minimum spanning tree is 80

  • the shortest path from A to F via E has weight 67

Determine the weight of arc CE and the weight of arc EF, making your reasoning clear.

6a
Sme Calculator
1 mark
fig-3-november-2021-9fm0-3d

Figure 3

left square bracket T h e space t o t a l space w e i g h t space o f space t h e space n e t w o r k space i s space 1648 right square bracket

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 (opens in a new tab).

Set up the initial time matrix.

6b
Sme Calculator
2 marks

Write your answer in the Answer Booklet (opens in a new tab).

Perform the first iteration of Floyd’s algorithm. You should show the time and route matrices after this iteration.

6c
Sme Calculator
4 marks

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

 

A

B

C

D

E

F

A

57

95

147

63

220

B

57

72

204

120

197

C

95

72

242

158

125

D

147

204

242

84

275

E

63

120

158

84

191

F

220

197

125

275

191

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.

Use an appropriate algorithm to find the roads that will need to be traversed twice.
You should make your method and working clear.

6d
Sme Calculator
1 mark

Write down the length of the route.

7a
Sme Calculator
6 marks

Write your answer in the Answer Booklet (opens in a new tab).

fig-4-november-2021-9fm0-3d

Figure 4

In Figure 4 the weights on the arcs represent distances.

(i) Use Dijkstra’s algorithm to find the shortest path from A to H.

(ii) State the length of the shortest path from A to H.

7b
Sme Calculator
3 marks

One application of Dijkstra’s algorithm has order n squared, where n is the number of nodes in the network. A computer produces a table of shortest distances between any two different nodes by repeatedly applying Dijkstra’s algorithm from each node of the network.

It takes the computer 0.082 seconds to produce a table of shortest distances for a network of 10 nodes.

Calculate approximately how long it will take, in seconds, for the computer to produce a table of shortest distances for a network with 200 nodes. You must give a reason for your answer.

7c
Sme Calculator
1 mark

Explain why your answer to part (b) can only be an approximation.

8a
Sme Calculator
1 mark
fig-3-specimen-2017-9fm0-3d

Figure 3

The network in Figure 3 shows the roads linking a depot, D, and three collection points A, B and C. The number on each arc represents the length, in miles, of the corresponding road. The road from B to D is a one-way road, as indicated by the arrow.

Explain clearly if Dijkstra’s algorithm can be used to find a route from D to A.

8b
Sme Calculator
7 marks

The initial distance and route tables for the network are given in the answer book (opens in a new tab).

Use Floyd’s algorithm to find a table of least distances. You should show both the distance table and the route table after each iteration.

8c
Sme Calculator
2 marks

Explain how the final route table can be used to find the shortest route from D to B.
State this route.

8d
Sme Calculator
2 marks

Find a minimum route and state its length.

8e
Sme Calculator
2 marks

Floyd’s algorithm and Dijkstra’s algorithm are applied to a network. Each will find the shortest distance between vertices of the network.

Describe how the results of these algorithms differ.

9a
Sme Calculator
6 marks
Network diagram labelled Figure 1 with nodes A to K connected by weighted edges, showing the total network weight as 299.

Figure 1 represents a network of cycle tracks between 10 landmarks, A, B, C, D, E, F, G, H, J and K. The number on each edge represents the length, in kilometres, of the corresponding track.

One day, Blanche wishes to cycle from A to K. She wishes to minimise the distance she travels.

(i) Use Dijkstra’s algorithm to find the shortest path from A to K.

(ii) State the length of the shortest path from A to K.

Graph diagram with vertices A to K, connected by edges with numerical weights. Includes a key for vertex labelling and final values. Paths shown between nodes.
9b
Sme Calculator
2 marks

The cycle tracks between the landmarks now need to be inspected. Blanche must travel along each track at least once. She wishes to minimise the length of her inspection route. Blanche will start her inspection route at D and finish at E.

(i) State the edges that will need to be traversed twice.

(ii) Find the length of Blanche’s route.

9c
Sme Calculator
5 marks

It is now decided to start the inspection route at A and finish at K. Blanche must minimise the length of her route and travel along each track at least once.

By considering the pairings of all relevant nodes, find the length of Blanche’s new route. You must make your method and working clear.

10a
2 marks

The initial distance matrix (Table 1) shows the lengths, in metres, of the corridors connecting six classrooms, A, B, C, D, E and F, in a school. For safety reasons, some of the corridors are one‑way only.

A

B

C

D

E

F

A

12

32

24

29

11

B

12

17

8

infinity

infinity

C

32

17

4

12

infinity

D

24

infinity

4

infinity

13

E

infinity

infinity

12

18

12

F

11

infinity

infinity

13

12

Table 1

By adding the arcs from vertex A, along with their weights, complete the drawing of this network on Diagram 1 below.

A graph diagram with points A-F; lines connect B-D, C-D, B-C, C-E, E-F. Line weights: B-C 17, B-D 8, C-D 4, C-F 18, C-E 12, D-F 13, E-F 12.
10b
Sme Calculator
4 marks

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

The distance matrix after two iterations of Floyd’s algorithm is shown in Table 2.

A

B

C

D

E

F

A

12

29

20

29

11

B

12

17

8

41

23

C

29

17

4

12

40

D

24

36

4

53

13

E

infinity

infinity

12

18

12

F

11

23

40

13

12

Table 2

Perform the next two iterations of Floyd's algorithm that follow from Table 2. You should show the distance matrix after each iteration.

Two grid tables labelled "3rd iteration" and "4th iteration" compare letters A to F, with some cells marked with a dash.
10c
4 marks

The final distance matrix after completion of Floyd’s algorithm is shown in Table 3.

A

B

C

D

E

F

A

12

24

20

23

11

B

12

12

8

24

21

C

28

17

4

12

17

D

24

21

4

16

13

E

23

29

12

16

12

F

11

23

17

13

12

Table 3

Yinka must visit each classroom. He will start and finish at E and wishes to minimise the total distance travelled.

(i) Use the nearest neighbour algorithm, starting at E, to find two Hamiltonian cycles in the completed network of shortest distances.

(ii) Find the length of each of the two cycles.

(iii) State, with a reason, which of the two cycles provides the better upper bound for the length of Yinka's route.

11a
Sme Calculator
6 marks
Diagram of connected nodes labelled A to J, forming a network with edges labelled by numbers, depicting a geometric shape with various intersecting lines.

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.

(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.

Graph with vertices A to J connected by weighted edges. Key shows vertex, order of labelling, and final value. Space for shortest path from A to J.
11b
Sme Calculator
2 marks

One application of Dijkstra’s algorithm has order space n squared , where space 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.

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.

12a
Sme Calculator
5 marks
Graph network with vertices A-K, connected by weighted edges. Lines include AG, DJ, and KH. Total weight of 413 displayed below as Figure 1.

Figure 1 represents a network of cycle tracks between ten towns, A, B, C, D, E, F, G, H, J and K. The number on each arc represents the length, in kilometres, of the corresponding track.

Use Dijkstra’s algorithm to find the shortest path from A to J.

Graph with vertices A to K, connected by edges with weights. Key explains labels for vertex, order, final and working values. Shortest path: A to J.
12b
Sme Calculator
6 marks

Abi needs to travel along every track shown in Figure 1 to check that they are all in good repair. She needs to start her inspection route at town G and finish her route at either town J or town K.

Abi wishes to minimise the total distance required to traverse every track.

By considering all relevant pairings of vertices, determine whether Abi should finish her inspection route at town J or town K. You must

  • state which tracks she will repeat in her route

  • state the total length of her route

12c
Sme Calculator
2 marks

The direct track between town B and town C and the direct track between town H and town K are now closed to all users. A second person, Tarig, is asked to check all the remaining tracks starting at G and finishing at H.

Tarig wishes to minimise the total length of his inspection route.

Determine which route, Abi’s or Tarig’s, is shorter. You must make your working clear.