Shortest Path Algorithms (Edexcel International AS Maths: Decision 1): Exam Questions

Exam code: XMA01

2 hours10 questions
1a
6 marks
A network diagram with vertices labelled A to K, connected by edges with various weights. The total weight of the network is 196.

Figure 1 models a network of roads. The number on each edge gives the time, in minutes, taken to travel along that road. Oliver wishes to travel by road from A to K as quickly as possible.

Use Dijkstra’s algorithm to find the shortest time needed to travel from A to K. State the quickest route.

Diagram of a directed graph with vertices A to K, edges labelled with numbers. Includes a key for vertex, order of labelling, final value, and working values.
1b
2 marks

On a particular day Oliver must travel from B to K via A.

Find a route of minimal time from B to K that includes A, and state its length.

1c
7 marks

Oliver needs to travel along each road to check that it is in good repair. He wishes to minimise the total time required to traverse the network.

Use the route inspection algorithm to find the shortest time needed. You must state all combinations of edges that Oliver could repeat, making your method and working clear.

2a
6 marks
Graph with vertices A-J connected by weighted edges. Notable weights: A-D 8, C-E 8, J-F 1, and total network weight is 193.

Figure 1 represents a network of roads. The number on each edge represents the length, in miles, of the corresponding road. Jan wishes to travel from A to J. She wishes to minimise the distance she travels.

Use Dijkstra’s algorithm to find the shortest path from A to J. Obtain the shortest path and state its length.

Graph diagram with vertices A to J interconnected by weighted edges. Boxes near vertices for order labelling and values. Legend explains values.
2b
2 marks

On Monday, Jan needs to travel from her gym at J to her home at H via her office at A.

State the shortest path from J to H via A and its length.

2c
5 marks

On Tuesday, Jan needs to check each road. She must travel along each road at least once. Jan must start and finish at A.

Use the route inspection algorithm to find the length of the shortest inspection route. State the roads that should be repeated. You should make your method and working clear.

2d
3 marks

On Wednesday, Jan decides to start her inspection route at G but can finish her route at a different node. The inspection route must still traverse each road at least once.

Determine where the route should finish so that the length of the inspection route is minimised. You must give reasons for your answer and state the length of the route.

3a
6 marks
Graph with vertices A to J, connected by edges labelled with weights. The total network weight is 383 plus x.

Figure 4 models a network of roads. The number on each edge gives the time, in minutes, to travel along the corresponding road. The vertices, A, B, C, D, E, F, G, H and J represent nine towns. Ezra wishes to travel from A to H as fast as possible.

The time taken to travel between towns G and J is unknown and is denoted by xminutes.

Dijkstra’s algorithm is to be used to find the fastest time to travel from A to H. On Diagram 1 below the “Order of labelling” and “Final value” at A and J, and the “Working values” at J, have already been completed.

Flowchart diagram with nodes A to J showing paths with numeric values. A key explains vertex, order of labelling, final and working values. Labels for fastest time and quickest route.

Use Dijkstra’s algorithm to find the fastest time to travel from A to H. State the quickest route.

3b
6 marks

Ezra needs to travel along each road to check it is in good repair. He wishes to minimise the total time required to traverse the network. Ezra plans to start and finish his inspection route at A. It is given that his route will take at least 440 minutes.

Use the route inspection algorithm and the completed Diagram 1 to find the range of possible values of x.

3c
1 mark

Write down a possible route for Ezra.

3d
2 marks

A new direct road from D to H is under construction and will take 25 minutes to travel along. Ezra will include this new road in a minimum length inspection route starting and finishing at A. It is given that this inspection route takes exactly 488 minutes.

Determine the value of x. You must give reasons for your answer.

4a
6 marks
Graph showing nodes A to H connected by lines with weights: includes edges AE, EF, FG, GH, HD, DE, EB, and others, forming a network of paths.

Figure 5 models a network of roads. The number on each edge gives the length, in km, of the corresponding road. The vertices, A, B, C, D, E, F, G and H, represent eight towns. Bronwen needs to visit each town. She will start and finish at A and wishes to minimise the total distance travelled.

By applying Dijkstra’s algorithm, starting at A, complete the table of least distances.

Graph diagram with vertices A to H connected by weighted edges. Each vertex has a grid for labelling order and values. Key explains grid usage.

A

B

C

D

E

F

G

H

A

-

B

-

14

2

4

11

18

19

C

14

-

12

10

15

22

23

D

2

12

-

2

9

16

17

E

4

10

2

-

7

14

15

F

11

15

9

7

-

7

8

G

18

22

16

14

7

-

1

H

19

23

17

15

8

1

-

4b
2 marks

Starting at A, use the nearest neighbour algorithm to find an upper bound for the length of Bronwen’s route. Write down the route that gives this upper bound.

4c
4 marks

A reduced network is formed by deleting A and all arcs that are directly joined to A.

(i) Use Prim’s algorithm, starting at C, to construct a minimum spanning tree for the reduced network. You must clearly state the order in which you select the arcs of your tree.

(ii) Hence, calculate a lower bound for the length of Bronwen’s route.

Table showing distances with rows and columns labelled B to H. The diagonal shows dashes. Each cell contains a number representing a distance.
4d
2 marks

Using only the results from (b) and (c), write down the smallest interval that you can be confident contains the length of Bronwen’s optimal route.

5a
2 marks

Explain what is meant by the term ‘path’.

5b
6 marks
Geometric diagram with labelled points A-J, connected by lines with various lengths, forming triangles and polygons. Figure 1 caption below.

Figure 1 represents a network of roads. The number on each arc represents the length, in km, of the corresponding road. Piatrice wishes to travel from A to J.

Use Dijkstra’s algorithm to find the shortest path Piatrice could take from A to J. State your path and its length.

Graph diagram with nodes A to J, connected by weighted edges. A key explains vertex labelling. Spaces provided for shortest path and its length.
5c
2 marks

Piatrice needs to return from J to A via G.

Find the shortest path Piatrice could take from J to A via G and state its length.

6a
2 marks
A geometric diagram with labelled points A to K, connected by lines with numbers indicating distances between them. Lines intersect at various points.

Figure 4 represents a network of roads. The number on each arc represents the length, in miles, of the corresponding road. Tamasi, who lives at A, needs to collect a caravan. Tamasi can collect a caravan from either J or K.

Tamasi decides to use Dijkstra’s algorithm once to find the shortest routes between A and J and between A and K.

State, with a reason, which vertex should be chosen as the starting vertex for the algorithm.

6b
7 marks

Use Dijkstra’s algorithm to find the shortest routes from A to J and from A to K. You should state the routes and their corresponding lengths.

Network diagram with vertices A to K, connected by lines with numerical values. A key explains the labels: vertex, order, final value, and working values.
6c
1 mark

Tamasi’s brother lives at F. He needs to visit Tamasi at A and then visit their mother who lives at H.

Find a route of minimal length that goes from F to H via A.

7a
6 marks
Network diagram with vertices A to K connected by edges with weights. Total network weight is 253.

Figure 1 represents a network of roads between 10 cities, A, B, C, D, E, F, G, H, J and K. The number on each edge represents the length, in miles, of the corresponding road.

One day, Mabintou wishes to travel from A to H. She wishes to minimise the distance she travels.

Use Dijkstra’s algorithm to find the shortest path from A to H. State your path and its length.

Network diagram with vertices A to K, labelled edges indicate weights. Empty boxes for vertex data. Key for labelling and values. Lines for shortest path.
7b
2 marks

On another day, Mabintou wishes to travel from F to K via A.

Find a route of minimum length from F to K via A and state its length.

7c
6 marks

The roads between the cities need to be inspected. James must travel along each road at least once. He wishes to minimise the length of his inspection route. James will start his inspection route at A and finish at J.

By considering the pairings of all relevant nodes, find the length of James’ route. State the arcs that will need to be traversed twice. You must make your method and working clear.

7d
1 mark

State the number of times that James will pass through F.

7e
1 mark

It is now decided to start the inspection route at D. James must minimise the length of his route. He must travel along each road at least once but may finish at any vertex.

State the vertex where the new inspection route will finish.

7f
1 mark

Calculate the difference between the lengths of the two inspection routes.

8a
7 marks
Diagram of a network of connected points labelled A to H with weighted edges, total weight is 205 + 3x, figure 3 caption below.

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

Malcolm wishes to minimise the time spent driving from his home at A to his office at H. The delays from roadworks on two of the roads leading in to H vary daily, and so the time taken to drive along these roads is expressed in terms of x, where x is fixed for any given day and x greater than 0

Use Dijkstra’s algorithm to find the possible routes that minimise the driving time from A to H. State the length of each route, leaving your answer in terms of x where necessary.

Flow network diagram with vertices A to H connected by directed edges with weights. Includes a key for vertex, order of labelling, and values.
8b
4 marks

On Monday, Malcolm needs to check each road. He must travel along each road at least once. He must start and finish at H and minimise the total time taken for his inspection route.

Malcolm finds that his minimum duration inspection route requires him to traverse exactly four roads twice and the total time it takes to complete his inspection route is 307 minutes.

Calculate the minimum time taken for Malcolm to travel from A to H on Monday. You must make your method and working clear.

9a
6 marks
Graph with nodes A-J connected by edges with weights, total weight is 269. Notable weights: A-B 14, B-D 8, C-E 2, E-H 20, H-J 20, B-G 31.

Figure 3 models a network of roads. The number on each edge gives the time taken, in minutes, to travel along the corresponding road.

Use Dijkstra's algorithm to find the shortest time needed to travel from A to J. State the quickest route.

Network diagram with vertices A to J showing paths with numeric weights. Includes a key for order of labelling and final value with space for shortest time and quickest route.
9b
5 marks

Alan needs to travel along all the roads to check that they are in good repair. He wishes to complete his route as quickly as possible and will start at his home, H, and finish at his workplace, D.

By considering the pairings of all relevant nodes, find the arcs that will need to be traversed twice in Alan's inspection route from H to D. You must make your method and working clear.

9c
2 marks

For Alan's inspection route from H to D

(i) state the number of times vertex C will appear,

(ii) state the number of times vertex D will appear.

9d
2 marks

Determine whether it would be quicker for Alan to start and finish his inspection route at H, instead of starting at H and finishing at D. You must explain your reasoning and show all your working.

10a
6 marks
Geometric diagram with points A to K connected by lines, each labelled with distances. Shapes include triangles and quadrilaterals. Figure 1 is noted below.

Figure 1 represents a network of roads between ten villages, A, B, C, D, E, F, G, H, J and K. The number on each edge represents the length, in kilometres, of the corresponding road. The local council needs to find the shortest route from A to J.

Use Dijkstra’s algorithm to find the shortest route from A to J. State the route and its length.

Diagram of a network with labelled vertices A-K connected by edges with numerical values. A key explains vertex labelling and values. Spaces for shortest route details.
10b
2 marks

During the winter, the council needs to ensure that all ten villages are accessible by road even if there is heavy snow. The council wishes to minimise the total length of road it needs to keep clear.

Use Prim’s algorithm, starting at A, to find a minimum connector for the five villages A, B, C, D and E. You must clearly state the order in which you select the edges of your minimum connector.

10c
2 marks

Use Kruskal’s algorithm to find a minimum connector for the five villages F, G, H, J and K. You must clearly show the order in which you consider the edges. For each edge, state whether or not you are including it in your minimum connector.

10d
1 mark

Calculate the total length of road that the council must keep clear of snow to ensure that all ten villages are accessible.