You are on page 1of 241

2ND AUGUST 2023 [634 marks]

1.
[Maximum mark: 17]
SPM.2.AHL.TZ0.5
The following table shows the costs in US dollars (US$) of direct flights between six
cities. Blank cells indicate no direct flights. The rows represent the departure cities. The
columns represent the destination cities.

The following table shows the least cost to travel between the cities.

A travelling salesman has to visit each of the cities, starting and finishing at city A.
(a)
Show the direct flights between the cities as a graph.
[2]
Markscheme

A2
[2 marks]

(b)
Write down the adjacency matrix for this graph.
[2]
Markscheme
attempt to form an adjacency matrix M1
0 1 1 0 0 0
1 0 1 1 1 0
⎛1 1 0 0 0 0⎞
⎜ ⎟ A1
⎜0 1 0 0 1 1⎟
0 1 0 1 0 1
⎝0 0 0 1 1 0⎠
[2 marks]

(c)
Using your answer to part (b), find the number of different ways to travel from and return
to city A in exactly 6 flights.
[2]
Markscheme
raising the matrix to the power six (M1)
50 A1
[2 marks]

(d)
State whether or not it is possible to travel from and return to city A in exactly 6
flights, having visited each of the other 5 cities exactly once. Justify your answer.
[2]
Markscheme
not possible A1
because you must pass through B twice R1
Note: Do not award A1R0.
[2 marks]
(e)
Find the values of 𝑎 and 𝑏.
[2]
Markscheme
𝑎 = 230, 𝑏 = 340 A1A1
[2 marks]

(g)
By deleting vertex A, use the deleted vertex algorithm to find a lower bound for the cost of
the trip.
[4]
Markscheme
finding weight of minimum spanning tree M1
70 + 80 + 100 + 180 = (US$) 430 A1
adding in two edges of minimum weight M1
430 + 90 + 150 = (US$) 670 A1
[4 marks]

(f)
Use the nearest neighbour algorithm to find an upper bound for the cost of the trip.
[3]
Markscheme
A→B→D→E→F→C→A (M1)
90 + 70 + 100 + 210 + 330 + 150 (A1)
(US$) 950 A1
[3 marks]
2.
[Maximum mark: 7]
EXN.1.AHL.TZ0.11
Nymphenburg Palace in Munich has extensive grounds with 9 points of interest (stations)
within them.
These nine points, along with the palace, are shown as the vertices in the graph below. The
weights on the edges are the walking times in minutes between each of the stations and the
total of all the weights is 105 minutes.

Anders decides he would like to walk along all the paths shown beginning and ending at the
Palace (vertex A).
Use the Chinese Postman algorithm, clearly showing all the stages, to find the shortest time
to walk along all the paths.
[7]
Markscheme
* This sample question was produced by experienced DP mathematics senior examiners to
aid teachers in preparing for external assessment in the new MAA course. There may be
minor differences in formatting compared to formal exam papers.
Odd vertices are B, F, H and I (M1)A1
Pairing the vertices M1
BF and HI 9 + 3 = 12
BH and FI 4 + 11 = 15
BI and FH 3 + 8 = 11 A2

Note: award A1 for two correct totals.

Shortest time is 105 + 11 = 116 (minutes) M1A1

[7 marks]
3.
[Maximum mark: 8]
EXM.1.AHL.TZ0.36
Apply Prim’s algorithm to the weighted graph given below to obtain the minimal spanning
tree starting with the vertex A.
Find the weight of the minimal spanning tree.
[8]
Markscheme
We start with point A and write S as the set of vertices and T as the set of edges.
The weights on each edge will be used in applying Prim’s algorithm.
Initially, S = {A}, T = Φ. In each subsequent stage, we shall update S and T.
Step 1: Add edge h: So S = {A, D}, T = {h}
Step 2: Add edge e: So S = {A, D, E} T = {h, e}
Step 3: Add edge d: Then S = {A, D, E, F} T = {h, e, d}
Step 4: Add edge a: Then S = {A, D, E, F, B} T = {h, e, d, a}
Step 5: Add edge i: Then S = {A, D, E, F, B, G} T = {h, e, d, a, i}
Step 6: Add edge g: Then S = (A, D, E, F, B, G, C} T = {h, e, d, a, I, g} (M4)(A3)
Notes: Award (M4)(A3) for all 6 correct,
(M4)(A2) for 5 correct;
(M3)(A2) for 4 correct,
(M3)(A1) for 3 correct;
(M1)(A1) for 2 correct,
(M1)(AO) for 1 correct
OR
(M2) for the correct definition of Prim’s algorithm,
(M2) for the correct application of Prim’s algorithm,
(A3) for the correct answers at the last three stages.
Now S has all the vertices and the minimal spanning tree is obtained.
The weight of the edges in T is 5 + 3 + 5 + 7 + 5 + 6
= 31 (A1)
[8 marks]
4.
[Maximum mark: 8]
EXM.1.AHL.TZ0.37
In this part, marks will only be awarded if you show the correct application of the required
algorithms, and show all your working.
In an offshore drilling site for a large oil company, the distances between the planned wells
are given below in metres.

It is intended to construct a network of paths to connect the different wells in a way that
minimises the sum of the distances between them.
Use Prim’s algorithm, starting at vertex 3, to find a network of paths of minimum total
length that can span the whole site.
[8]
Markscheme
(R2)(A4)(M1)
(A1)
Note: Award (R2) for correct algorithms, (R1) for 1 error, (R0) for 2 or more errors.
Award (A4) for correct calculations, (A3) for 1 error, (A2) for 2 errors, (A1) for 3 errors,
(A0) for 4 or more errors.
Award (M1) for tree/table/method.
Award (A1) for minimum weight.
[8 marks]
5.
[Maximum mark: 6]
EXM.1.AHL.TZ0.38
The diagram below shows a weighted graph.

Use Prim’s algorithms to find a minimal spanning tree, starting at J. Draw the tree, and find
its total weight.
[6]
Markscheme

(C4)
OR
(C4)
Total weight = 17 (A2)
Note: There are other possible spanning trees.
[6 marks]
6.
[Maximum mark: 10]
EXM.1.AHL.TZ0.40
The weights of the edges of a complete graph G are shown in the following table.
Starting at B, use Prim’s algorithm to find and draw a minimum spanning tree for G. Your
solution should indicate the order in which the vertices are added. State the total weight of
your tree.
[10]
Markscheme
Different notations may be used but the edges should be added in the following order.
Using Prim’s Algorithm, (M1)
BD A1
DF A1
FA A1
FE A1
EC A1

A2
Total weight = 12 A2
[10 marks]
7.
[Maximum mark: 12]
EXM.1.AHL.TZ0.41
The weights of the edges in a simple graph G are given in the following table.

Use Prim’s Algorithm, starting with vertex F, to find and draw the minimum spanning tree
for G. Your solution should indicate the order in which the edges are introduced.
[12]
Markscheme
The edges are introduced in the following order:
FD, FC, CB, BA, CE A2A2A2A2A2
A2
[12 marks]
8.
[Maximum mark: 8]
EXM.1.AHL.TZ0.23
Sameer is trying to design a road system to connect six towns, A, B, C, D, E and F.
The possible roads and the costs of building them are shown in the graph below. Each
vertex represents a town, each edge represents a road and the weight of each edge is the
cost of building that road. He needs to design the lowest cost road system that will connect
the six towns.
(a)
Name an algorithm that will allow Sameer to find the lowest cost road system.
[1]
Markscheme
EITHER
Prim’s algorithm A1
OR
Kruskal’s algorithm A1
[1 mark]

(b)
Find the lowest cost road system and state the cost of building it. Show clearly the steps of
the algorithm.
[7]
Markscheme
EITHER
using Prim’s algorithm, starting at A

A1A1A1A1A1
lowest cost road system contains roads AC, CD, CF, FE and AB A1
cost is 20 A1
OR
using Kruskal’s algorithm

A1A1A1A1A1
lowest cost road system contains roads CD, CF, FE, AC and AB A1
cost is 20 A1
Note: Accept alternative correct solutions.
[7 marks]
9.
[Maximum mark: 6]
EXM.1.AHL.TZ0.39
Let G be a weighted graph with 6 vertices L, M, N, P, Q, and R. The weight of the edges
joining the vertices is given in the table below:
For example the weight of the edge joining the vertices L and N is 3.
(a)
Use Prim’s algorithm to draw a minimum spanning tree starting at M.
[5]
Markscheme
M→Q (M1)
Q→L (A1)
M→P (A1)
P → N → R (A1)

(A1)
Note: There are other correct answers.
[5 marks]
(b)
What is the total weight of the tree?
[1]
Markscheme
The total weight is 2 + 1 + 3 + 2 + 3 = 11. (A1)
[1 mark]

10.
[Maximum mark: 6]
EXM.1.AHL.TZ0.1
The cost adjacency matrix below represents the distance in kilometres, along routes
between bus stations.

All the values in the matrix are positive, distinct integers.


It is decided to electrify some of the routes, so that it will be possible to travel from any
station to any other station solely on electrified routes. In order to achieve this with a
minimal total length of electrified routes, Prim’s algorithm for a minimal spanning tree is
used, starting at vertex A.
The algorithm adds the edges in the following order:
AB AC CD DE.
There is only one minimal spanning tree.
(a)
Find with a reason, the value of 𝑥.
[2]
Markscheme
AB must be the length of the smallest edge from A so 𝑥 = 1. R1A1
[2 marks]

(b)
If the total length of the minimal spanning tree is 14, find the value of 𝑠.
[2]
Markscheme
1 + 2 + 3 + 𝑠 = 14 ⇒ 𝑠 = 8 M1A1
[2 marks]

(c)
Hence, state, with a reason, what can be deduced about the values of 𝑝, 𝑞, 𝑟.
[2]
Markscheme
The last minimal edge chosen must connect to E , so since 𝑠 = 8 each of 𝑝, 𝑞, 𝑟 must be ≥ 9.
R1A1
[2 marks]
11.
[Maximum mark: 9]
EXM.1.AHL.TZ0.24

The above diagram shows the weighted graph G.


(a.i)
Write down the adjacency matrix for G.
[1]
Markscheme
0 1 0 0 0 1
1 0 1 1 1 0
⎛0 1 0 1 0 0⎞
M=⎜ ⎟ A1
⎜0 1 1 0 1 1⎟
0 1 0 1 0 1
⎝1 0 0 1 1 0⎠
[1 mark]
(a.ii)
Find the number of distinct walks of length 4 beginning and ending at A.
[3]
Markscheme
We require the (A, A) element of M4 which is 13. M1A2
[3 marks]

(b)
Starting at A, use Prim’s algorithm to find and draw the minimum spanning tree for G.
Your solution should indicate clearly the way in which the tree is constructed.
[5]
Markscheme
A1A1A1A1A1
[5 marks]
12.
[Maximum mark: 12]
EXM.2.AHL.TZ0.2
The cost adjacency matrix for the complete graph K6 is given below.

It represents the distances in kilometres along dusty tracks connecting villages on an


island. Find the minimum spanning tree for this graph; in all 3 cases state the order in
which the edges are added.
It is desired to tarmac some of these tracks so that it is possible to walk from any village to
any other village walking entirely on tarmac.
(a)
Briefly explain the two differences in the application of Prim’s and Kruskal’s algorithms for
finding a minimum spanning tree in a weighted connected graph.
[2]
Markscheme
In Prim’s algorithm you start at a particular (given) vertex, whereas in Kruskal’s you start
with the smallest edge. A1
In Prim’s as smallest edges are added (never creating a circuit) the created graph always
remains connected, whereas in Kruskal’s this requirement to always be connected is not
necessary. A1
[2 marks]
(b.i)
Using Kruskal’s algorithm.
[2]
Markscheme
Edges added in the order
AB EF AC AD AE A1A1
[note A1 for the first 2 edges A1 for other 3]
[2 marks]

(b.ii)
Using Prim’s algorithm starting at vertex A.
[2]
Markscheme
Edges added in the order
AB AC AD AE EF A1A1
[note A1 for the first 2 edges A1 for other 3]
[2 marks]

(b.iii)
Using Prim’s algorithm starting at vertex F.
[2]
Markscheme
Edges added in the order
FE AE AB AC AD A1A1
[note A1 for the first 2 edges A1 for other 3]
[2 marks]

(c.ii)
Sketch the tracks that are to be tarmacked.
[2]
Markscheme
A2
[2 marks]

(c.i)
State the total minimum length of the tracks that have to be tarmacked.
[2]
Markscheme
1 + 2 + 3 + 4 + 5 = 15 M1A1
[2 marks]
13.
[Maximum mark: 14]
EXM.2.AHL.TZ0.19
Let G be the graph below.

(a)
Find the total number of Hamiltonian cycles in G, starting at vertex A. Explain your answer.
[3]
Markscheme
Starting from vertex A there are 4 choices. From the next vertex there are three choices,
etc… M1R1
So the number of Hamiltonian cycles is 4! = 24. A1 N1
[3 marks]

(b.i)
Find a minimum spanning tree for the subgraph obtained by deleting A from G.
[3]
Markscheme
Start (for instance) at B, using Prim′s algorithm Then D is the nearest vertex M1
Next E is the nearest vertex A1
Finally C is the nearest vertex So a minimum spanning tree is B → D → E → C A1 N1
[3 marks]
(b.ii)
Hence, find a lower bound for the travelling salesman problem for G.
[3]
Markscheme
A lower bound for the travelling salesman problem is then obtained by adding the weights
of AB and AE to the weight of the minimum M1
spanning tree (ie 20) A1
A lower bound is then 20 + 7 + 6 = 33 A1 N1
[3 marks]
(c)
Give an upper bound for the travelling salesman problem for the graph above.
[2]
Markscheme
ABCDE is an Hamiltonian cycle A1
Thus an upper bound is given by 7 + 9 + 9 + 8 + 6 = 39 A1
[2 marks]

(d)
Show that the lower bound you have obtained is not the best possible for the solution to
the travelling salesman problem for G.
[3]
Markscheme
Eliminating C from G a minimum spanning tree is E → A → B → D M1
of weight 18 A1
Adding BC to CE(18 + 9 + 7) gives a lower bound of 34 > 33 A1
So 33 not the best lower bound. AG N0
[3 marks]

14.
[Maximum mark: 12]
EXM.2.AHL.TZ0.17
A canal system divides a city into six land masses connected by fifteen bridges, as shown in
the diagram below.
State with reasons whether or not this graph has
(a)
Draw a graph to represent this map.
[2]
Markscheme
A2
[2 marks]
(b)
Write down the adjacency matrix of the graph.
[2]
Markscheme
A B C D E F
A 0 1 2 1 2 2
B 1 0 0 0 1 2
⎛ 1⎞
M= C 2 0 0 1 0 A2
⎜ ⎟
D ⎜1 0 1 0 1 0⎟
E 2 1 0 1 0 1
F ⎝2 2 1 0 1 0⎠
Note: Award A1 for one error or omission, A0 for more than one error or omission. Two
symmetrical errors count as one error.
[2 marks]

(c)
List the degrees of each of the vertices.
[2]
Markscheme
A B C D E F
(8, 4 4, 3 5, 6) A2
Note: Award no more than A1 for one error, A0 for more than one error.
[2 marks]

(d.i)
an Eulerian circuit.
[2]
Markscheme
no, because there are odd vertices M1A1
[2 marks]

(d.ii)
an Eulerian trail.
[2]
Markscheme
yes, because there are exactly two odd vertices M1A1
[2 marks]

(e)
Find the number of walks of length 4 from E to F.
[2]
Markscheme
A B C D E F
A 309 174 140 118 170 214
B 174 117 106 70 122 132
M = C
4 ⎛140 106 117 66 134 138⎞ (M1)A1

⎜ 118 ⎟
D 70 66 53 80 102⎟
E 170 122 134 80 157 170
F ⎝ 214 132 138 102 170 213⎠
number of walks of length 4 is 170
Note: The complete matrix need not be shown. Only one of the FE has to be shown.
[2 marks]

15.
[Maximum mark: 19]
EXM.2.AHL.TZ0.18
The adjacency matrix of the graph G, with vertices P, Q, R, S, T is given by:
P Q R S T
P 0 2 1 1 0
Q ⎛2 1 1 1 0⎞
R ⎜1 1 1 0 2⎟
S 1 1 0 0 0
T ⎝0 0 2 0 0⎠
(a)
Draw the graph of G.
[3]
Markscheme
A3

Note: Award A2 for one missing or misplaced edge,


A1 for two missing or misplaced edges.
[3 marks]
(b.i)
Define an Eulerian circuit.
[1]
Markscheme
an Eulerian circuit is one that contains every edge of the graph exactly once A1
[1 mark]
(b.ii)
Write down an Eulerian circuit in G starting at P.
[2]
Markscheme
a possible Eulerian circuit is
P→Q→S→P→Q→Q→R→T→R→R→P A2
[2 marks]

(c.i)
Define a Hamiltonian cycle.
[2]
Markscheme
a Hamiltonian cycle passes through each vertex of the graph A1
exactly once A1
[2 marks]
(c.ii)
Explain why it is not possible to have a Hamiltonian cycle in G.
[3]
Markscheme
to pass through T, you must have come from R and must return to R. R3
hence there is no Hamiltonian cycle
[3 marks]

(d.i)
Find the number of walks of length 5 from P to Q.
[4]
Markscheme
0 2 1 1 0
⎛2 1 1 1 0⎞
using the adjacency matrix A = ⎜1 1 1 0 2⎟, (M1)
1 1 0 0 0
⎝0 0 2 0 0⎠
we need the entry in the first row second column of the matrix A5 (M1)
245 309 274 143 126
⎛309 363 322 168 156⎞
A5 = ⎜274 322 295 141 164⎟ (A1)
143 168 141 77 72
⎝126 156 164 72 72 ⎠
hence there are 309 ways A1
[4 marks]

(d.ii)
Which pairs of distinct vertices have more than 15 walks of length 3 between them?
[4]
Markscheme
13 21 17 10 6
⎛21 22 19 11 8 ⎞
A3 = ⎜17 19 18 7 14⎟ (M1)
10 11 7 5 4
⎝6 8 14 4 4⎠
hence the pairs of vertices are PQ, PR and QR A1A1A1
[4 marks]

16.
[Maximum mark: 19]
EXM.2.AHL.TZ0.18
The adjacency matrix of the graph G, with vertices P, Q, R, S, T is given by:
P Q R S T
P 0 2 1 1 0
Q ⎛2 1 1 1 0⎞
R ⎜1 1 1 0 2⎟
S 1 1 0 0 0
T ⎝0 0 2 0 0⎠
(a)
Draw the graph of G.
[3]
Markscheme

A3

Note: Award A2 for one missing or misplaced edge,


A1 for two missing or misplaced edges.
[3 marks]
(b.i)
Define an Eulerian circuit.
[1]
Markscheme
an Eulerian circuit is one that contains every edge of the graph exactly once A1
[1 mark]
(b.ii)
Write down an Eulerian circuit in G starting at P.
[2]
Markscheme
a possible Eulerian circuit is
P→Q→S→P→Q→Q→R→T→R→R→P A2
[2 marks]

(c.i)
Define a Hamiltonian cycle.
[2]
Markscheme
a Hamiltonian cycle passes through each vertex of the graph A1
exactly once A1
[2 marks]
(c.ii)
Explain why it is not possible to have a Hamiltonian cycle in G.
[3]
Markscheme
to pass through T, you must have come from R and must return to R. R3
hence there is no Hamiltonian cycle
[3 marks]

(d.i)
Find the number of walks of length 5 from P to Q.
[4]
Markscheme
0 2 1 1 0
⎛2 1 1 1 0⎞
using the adjacency matrix A = ⎜1 1 1 0 2⎟, (M1)
1 1 0 0 0
⎝0 0 2 0 0⎠
we need the entry in the first row second column of the matrix A5 (M1)
245 309 274 143 126
⎛309 363 322 168 156⎞
A5 = ⎜274 322 295 141 164⎟ (A1)
143 168 141 77 72
⎝126 156 164 72 72 ⎠
hence there are 309 ways A1
[4 marks]

(d.ii)
Which pairs of distinct vertices have more than 15 walks of length 3 between them?
[4]
Markscheme
13 21 17 10 6
⎛21 22 19 11 8 ⎞
A3 = ⎜17 19 18 7 14⎟ (M1)
10 11 7 5 4
⎝6 8 14 4 4⎠
hence the pairs of vertices are PQ, PR and QR A1A1A1
[4 marks]

17.
[Maximum mark: 12]
EXM.2.AHL.TZ0.2
The cost adjacency matrix for the complete graph K6 is given below.
It represents the distances in kilometres along dusty tracks connecting villages on an
island. Find the minimum spanning tree for this graph; in all 3 cases state the order in
which the edges are added.
It is desired to tarmac some of these tracks so that it is possible to walk from any village to
any other village walking entirely on tarmac.
(a)
Briefly explain the two differences in the application of Prim’s and Kruskal’s algorithms for
finding a minimum spanning tree in a weighted connected graph.
[2]
Markscheme
In Prim’s algorithm you start at a particular (given) vertex, whereas in Kruskal’s you start
with the smallest edge. A1
In Prim’s as smallest edges are added (never creating a circuit) the created graph always
remains connected, whereas in Kruskal’s this requirement to always be connected is not
necessary. A1
[2 marks]
(b.i)
Using Kruskal’s algorithm.
[2]
Markscheme
Edges added in the order
AB EF AC AD AE A1A1
[note A1 for the first 2 edges A1 for other 3]
[2 marks]

(b.ii)
Using Prim’s algorithm starting at vertex A.
[2]
Markscheme
Edges added in the order
AB AC AD AE EF A1A1
[note A1 for the first 2 edges A1 for other 3]
[2 marks]
(b.iii)
Using Prim’s algorithm starting at vertex F.
[2]
Markscheme
Edges added in the order
FE AE AB AC AD A1A1
[note A1 for the first 2 edges A1 for other 3]
[2 marks]

(c.ii)
Sketch the tracks that are to be tarmacked.
[2]
Markscheme
A2
[2 marks]

(c.i)
State the total minimum length of the tracks that have to be tarmacked.
[2]
Markscheme
1 + 2 + 3 + 4 + 5 = 15 M1A1
[2 marks]
18.
[Maximum mark: 14]
EXM.2.AHL.TZ0.19
Let G be the graph below.

(a)
Find the total number of Hamiltonian cycles in G, starting at vertex A. Explain your answer.
[3]
Markscheme
Starting from vertex A there are 4 choices. From the next vertex there are three choices,
etc… M1R1
So the number of Hamiltonian cycles is 4! = 24. A1 N1
[3 marks]

(b.i)
Find a minimum spanning tree for the subgraph obtained by deleting A from G.
[3]
Markscheme
Start (for instance) at B, using Prim′s algorithm Then D is the nearest vertex M1
Next E is the nearest vertex A1
Finally C is the nearest vertex So a minimum spanning tree is B → D → E → C A1 N1
[3 marks]
(b.ii)
Hence, find a lower bound for the travelling salesman problem for G.
[3]
Markscheme
A lower bound for the travelling salesman problem is then obtained by adding the weights
of AB and AE to the weight of the minimum M1
spanning tree (ie 20) A1
A lower bound is then 20 + 7 + 6 = 33 A1 N1
[3 marks]
(c)
Give an upper bound for the travelling salesman problem for the graph above.
[2]
Markscheme
ABCDE is an Hamiltonian cycle A1
Thus an upper bound is given by 7 + 9 + 9 + 8 + 6 = 39 A1
[2 marks]

(d)
Show that the lower bound you have obtained is not the best possible for the solution to
the travelling salesman problem for G.
[3]
Markscheme
Eliminating C from G a minimum spanning tree is E → A → B → D M1
of weight 18 A1
Adding BC to CE(18 + 9 + 7) gives a lower bound of 34 > 33 A1
So 33 not the best lower bound. AG N0
[3 marks]

19.
[Maximum mark: 12]
EXM.2.AHL.TZ0.17
A canal system divides a city into six land masses connected by fifteen bridges, as shown in
the diagram below.
State with reasons whether or not this graph has
(a)
Draw a graph to represent this map.
[2]
Markscheme
A2
[2 marks]
(b)
Write down the adjacency matrix of the graph.
[2]
Markscheme
A B C D E F
A 0 1 2 1 2 2
B 1 0 0 0 1 2
⎛ 1⎞
M= C 2 0 0 1 0 A2
⎜ ⎟
D ⎜1 0 1 0 1 0⎟
E 2 1 0 1 0 1
F ⎝2 2 1 0 1 0⎠
Note: Award A1 for one error or omission, A0 for more than one error or omission. Two
symmetrical errors count as one error.
[2 marks]

(c)
List the degrees of each of the vertices.
[2]
Markscheme
A B C D E F
(8, 4 4, 3 5, 6) A2
Note: Award no more than A1 for one error, A0 for more than one error.
[2 marks]

(d.i)
an Eulerian circuit.
[2]
Markscheme
no, because there are odd vertices M1A1
[2 marks]

(d.ii)
an Eulerian trail.
[2]
Markscheme
yes, because there are exactly two odd vertices M1A1
[2 marks]

(e)
Find the number of walks of length 4 from E to F.
[2]
Markscheme
A B C D E F
A 309 174 140 118 170 214
B 174 117 106 70 122 132
M = C
4 ⎛140 106 117 66 134 138⎞ (M1)A1

⎜ 118 ⎟
D 70 66 53 80 102⎟
E 170 122 134 80 157 170
F ⎝ 214 132 138 102 170 213⎠
number of walks of length 4 is 170
Note: The complete matrix need not be shown. Only one of the FE has to be shown.
[2 marks]

20.
[Maximum mark: 7]
22N.1.AHL.TZ0.4
In a competition, a contestant has to move through a maze to find treasure. A graph of
the maze is shown below, where each edge represents a corridor in the maze. The
contestant starts at S and the treasure is located at T.
The competition rules state that the contestant can walk along a maximum of four
corridors.
(a)
Complete the adjacency matrix, 𝐌, for the graph.

[2]
Markscheme
SD = DS = 2 A1
AD = DA = 0 A1

[2 marks]
Examiners report
In part (a), a lot of candidates failed to see that S and D were connected by 2 edges but were
still given partial credit by the markscheme. There were some successful solutions to part
(b), often following through from the error in part (a). A lot of solutions gave the number of
walks with 4 edges rather than a maximum of 4 edges. It was disappointing to see so many
candidates trying to list all the possible walks, without any systematic approach, rather
than using the matrix as suggested by part (a). Part (c) gained some of the fewest marks for
any part of a question in the paper.

(b)
Find the number of walks from S to T with a maximum of 4 edges.
[4]
Markscheme
attempt to calculate at least one of 𝐌 = , 𝐌 > and 𝐌 ? (M1)
attempt to calculate all of 𝐌 = , 𝐌 > and 𝐌 ? (M1)
finding at least one of the top right entries, 4, 10, 64 (A1)
78 walks A1
Note: If SD = DS = 1 is their answer in part (a), their FT answer is (3 + 8 + 41 =) 52
walks.

[4 marks]

(c)
Explain why the number of ways the contestant can reach the treasure is less than
the answer to part (b).
[1]
Markscheme
because some of the walks will pass through T, before returning to T R1

[1 mark]
21.
[Maximum mark: 14]
22N.2.AHL.TZ0.4
A company has six offices, A, B, C, D, E and F. One of the company managers, Nanako, needs
to visit the offices. She creates the following graph that shows the distances, in kilometres,
between some of the offices.

Nanako wishes to find the shortest cycle to visit all the offices. She decides to complete a
weighted adjacency table, showing the least distance between each pair of offices.
Write down the value of
(a)
Write down a Hamiltonian cycle for this graph.
[1]
Markscheme
any correct Hamiltonian cycle e.g. ABCDEFA A1

[1 mark]
Examiners report
Candidates who had learnt graph theory usually scored well on this question. However,
there were also a number of candidates who either guessed or left most parts blank, except
for part (c). It is important that candidates are taught all parts of the syllabus to ensure
they can access the questions in the exam. In part (f), many candidates recognized that
deleting a different vertex might result in a different lower bound. However, a common
misconception was that a smaller value would be a better lower bound.

(b)
State, with a reason, whether the graph contains an Eulerian circuit.
[1]
Markscheme
no, since not all vertices have an even degree (or equivalent) R1

[1 mark]

(c.i)
𝑝.
[1]
Markscheme
49 A1

[1 mark]

(f)
Explain, with a reason, why the answer to part (e) might not be the best lower bound.
[2]
Markscheme
EITHER
deleting a different vertex A1
might give a higher value (and hence a better lower bound). R1

OR
the edges selected in part (e) do not form a cycle. A1
so a higher value is possible R1

[2 marks]

(e)
By deleting vertex F, find a lower bound for Nanako’s cycle.
[4]
Markscheme
attempt to find MST for vertices A, B, C, D and E M1
12 + 14 + 17 + 27 (= 70) A1
LB = 70 + 18 + 22 (M1)
= 110 A1

[4 marks]
(d)
Starting at vertex E, use the nearest neighbour algorithm to find an upper bound for
Nanako’s cycle.
[3]
Markscheme
cycle is EBCDFAE (M1)(A1)
UB = 12 + 25 + 17 + 34 + 18 + 35

Note: Award M1 for 12 + 25 + 17 + ⋯ OR EBCD.

= 141 A1

[3 marks]
(c.ii)
𝑞.
[1]
Markscheme
34 A1

[1 mark]

(c.iii)
𝑟.
[1]
Markscheme
50 A1

[1 mark]
22.
[Maximum mark: 14]
22N.2.AHL.TZ0.4
A company has six offices, A, B, C, D, E and F. One of the company managers, Nanako, needs
to visit the offices. She creates the following graph that shows the distances, in kilometres,
between some of the offices.

Nanako wishes to find the shortest cycle to visit all the offices. She decides to complete a
weighted adjacency table, showing the least distance between each pair of offices.
Write down the value of
(a)
Write down a Hamiltonian cycle for this graph.
[1]
Markscheme
any correct Hamiltonian cycle e.g. ABCDEFA A1

[1 mark]
Examiners report
Candidates who had learnt graph theory usually scored well on this question. However,
there were also a number of candidates who either guessed or left most parts blank, except
for part (c). It is important that candidates are taught all parts of the syllabus to ensure
they can access the questions in the exam. In part (f), many candidates recognized that
deleting a different vertex might result in a different lower bound. However, a common
misconception was that a smaller value would be a better lower bound.

(b)
State, with a reason, whether the graph contains an Eulerian circuit.
[1]
Markscheme
no, since not all vertices have an even degree (or equivalent) R1

[1 mark]

(c.i)
𝑝.
[1]
Markscheme
49 A1

[1 mark]

(f)
Explain, with a reason, why the answer to part (e) might not be the best lower bound.
[2]
Markscheme
EITHER
deleting a different vertex A1
might give a higher value (and hence a better lower bound). R1

OR
the edges selected in part (e) do not form a cycle. A1
so a higher value is possible R1

[2 marks]
(e)
By deleting vertex F, find a lower bound for Nanako’s cycle.
[4]
Markscheme
attempt to find MST for vertices A, B, C, D and E M1
12 + 14 + 17 + 27 (= 70) A1
LB = 70 + 18 + 22 (M1)
= 110 A1

[4 marks]
(d)
Starting at vertex E, use the nearest neighbour algorithm to find an upper bound for
Nanako’s cycle.
[3]
Markscheme
cycle is EBCDFAE (M1)(A1)
UB = 12 + 25 + 17 + 34 + 18 + 35

Note: Award M1 for 12 + 25 + 17 + ⋯ OR EBCD.

= 141 A1

[3 marks]
(c.ii)
𝑞.
[1]
Markscheme
34 A1

[1 mark]

(c.iii)
𝑟.
[1]
Markscheme
50 A1

[1 mark]
23.
[Maximum mark: 5]
22M.1.AHL.TZ1.13
At 1: 00 pm a ship is 1 km east and 4 km north of a harbour. A coordinate system is
defined with the harbour at the origin. The position vector of the ship at 1: 00 pm is given
1
by F G.
4
1.2
The ship has a constant velocity of F G kilometres per hour (km hJK ).
−0.6
(a)
Write down an expression for the position vector 𝐫 of the ship, 𝑡 hours after 1: 00 pm.
[1]
Markscheme

(𝐫 =) F1G + 𝑡 F 1.2 G A1
4 −0.6

Note: Do not condone the use of 𝜆 or any other variable apart from 𝑡.

[1 mark]
Examiners report
Most candidates were able to answer part (a) correctly but there were some very poor
examples of vector notation. The question asked for an expression of 𝐫 in terms of 𝑡 and
although a failure to write 𝐫 was condoned the use of 𝜆 or some other variable was
penalized. In part (b) few candidates recognized that the eastern and northern distances
O
would be equal with a bearing of 045°. Those who correctly obtained a value of 𝑡 = > often
did not use this to find the time as required.
(b)
Find the time at which the bearing of the ship from the harbour is 045˚.
[4]
Markscheme
when the bearing from the port is 045˚, the distance east from the port is equal to the
distance north from the port (M1)
1 + 1.2𝑡 = 4 − 0.6𝑡 (A1)
1.8𝑡 = 3
O
𝑡=> (1.6666 …, 1 hour 40 minutes) (A1)

time is 2: 40 pm (14: 40) A1

[4 marks]

24.
[Maximum mark: 5]
22M.1.AHL.TZ2.6
Consider the following directed network.

(a)
Write down the adjacency matrix for this network.
[2]
Markscheme
1 1 0 0 0
⎛1 0 0 0 1⎞
⎜0 1 0 1 0⎟ A2
1 0 0 0 0
⎝1 0 1 1 0⎠

Note: Award A2 for the transposed matrix. Presentation in markscheme assumes


columns/rows ordered A-E; accept a matrix with rows and/or columns in a different order
only if appropriately communicated. Do not FT from part (a) into part (b).

[2 marks]
Examiners report
This was well answered by the majority of candidates with most writing down the correct
adjacency matrix and then raising it to the power 5.
(b)
Determine the number of different walks of length 5 that start and end at the same vertex.
[3]
Markscheme
raising their matrix to a power of 5 (M1)

17 9 2 3 5
O
⎛17 10 3 4 4⎞
𝐌 = ⎜13 6 2 2 4⎟ (A1)
8 5 1 2 2
⎝18 11 2 4 5⎠

Note: The numbers along the diagonal are sufficient to award M1A1.

(the required number is 17 + 10 + 2 + 2 + 5 =) 36 A1

[3 marks]
25.
[Maximum mark: 25]
21N.3.AHL.TZ0.1
This question explores how graph algorithms can be applied to a graph with
an unknown edge weight.

Graph 𝑊 is shown in the following diagram. The vertices of 𝑊 represent tourist


attractions in a city. The weight of each edge represents the travel time, to the nearest
minute, between two attractions. The route between A and F is currently being resurfaced
and this has led to a variable travel time. For this reason, AF has an unknown travel time 𝑥
minutes, where 𝑥 ∈ ℤU .
Daniel plans to visit all the attractions, starting and finishing at A. He wants to minimize
his travel time.
To find a lower bound for Daniel’s travel time, vertex A and its adjacent edges are first
deleted.
Daniel makes a table to show the minimum travel time between each pair of attractions.

Write down the value of


To find an upper bound for Daniel’s travel time, the nearest neighbour algorithm is
used, starting at vertex A.
Consider the case where 𝑥 = 3.
Consider the case where 𝑥 > 3.
(a)
Write down a Hamiltonian cycle in 𝑊.
[1]
Markscheme
e.g. ABCDEGHFA A1

Note: Accept any other correct answers starting at any vertex.

[1 mark]
Examiners report
Mostly well done, although some candidates wrote down a path instead of a cycle and some
candidates wrote a cycle that did not include all the vertices.

(b.i)
Use Prim’s algorithm, starting at vertex B, to find the weight of the minimum spanning tree
of the remaining graph. You should indicate clearly the order in which the algorithm selects
each edge.
[5]
Markscheme
7 vertices, so 6 edges required for MST (M1)

Note: To award (M1), their 6 edges should not form a cycle.


M1A1A1

Note: Award M1 for the first three edges in correct order, A1 for BH in correct order and
A1 for all of the edges correct.

weight of MST = 33 A1

Note: The final A1 can be awarded independently of previous marks.

[5 marks]
Examiners report
Many candidates could apply the algorithm correctly to find the weight of the minimum
spanning tree. A common misconception was selecting the shortest edge adjacent to the
previous vertex, instead of selecting the shortest edge adjacent to the existing tree. This
approach will not necessarily find the minimum spanning tree. A small number of
candidates found the correct minimum spanning tree, but did not show evidence of using
Prim’s algorithm, which only received partial credit; where a method/algorithm is explicit
in the question, working must be seen to demonstrate that approach. Part (b)(ii) was also
answered reasonably well, however several candidates did not read the instruction to give
their answer in terms of 𝑥, instead choosing a specific value.
(e.ii)
Hence state the value of the upper bound for Daniel’s travel time for the value of 𝑥 found in
part (e)(i).
[2]
Markscheme
upper bound = 58 A2

[2 marks]
Examiners report
This question had a mixed response. Some candidates used the table or the graph to realize
that the two choices to get from 𝐴 to 𝐹 are either 18 or 𝑥. Some incorrectly stated 𝑥 = 18.
These candidates often achieved success in part (e)(ii), making the connection to their
previous answer in part (d).
(c.i)
𝑝.
[1]
Markscheme
𝑝 = 13 A1

[1 mark]
Examiners report
Mostly well-answered.

(c.ii)
𝑞.
[1]
Markscheme
𝑞 = 17 A1

[1 mark]
Examiners report
Mostly well-answered.
(c.iii)
𝑟.
[1]
Markscheme
𝑟 = 14 A1

[1 mark]
Examiners report
Mostly well-answered.

(b.ii)
Hence, for the case where 𝑥 < 9, find a lower bound for Daniel’s travel time, in terms of 𝑥.
[2]
Markscheme
lower bound = 33 + 3 + 𝑥 (M1)
= 36 + 𝑥 A1

[2 marks]
Examiners report
Many candidates could apply the algorithm correctly to find the weight of the minimum
spanning tree. A common misconception was selecting the shortest edge adjacent to the
previous vertex, instead of selecting the shortest edge adjacent to the existing tree. This
approach will not necessarily find the minimum spanning tree. A small number of
candidates found the correct minimum spanning tree, but did not show evidence of using
Prim’s algorithm, which only received partial credit; where a method/algorithm is explicit
in the question, working must be seen to demonstrate that approach. Part (b)(ii) was
also answered reasonably well, however several candidates did not read the instruction to
give their answer in terms of 𝑥, instead choosing a specific value.

(f)
The tourist office in the city has received complaints about the lack of cleanliness of
some routes between the attractions. Corinne, the office manager, decides to inspect all the
routes between all the attractions, starting and finishing at H. The sum of the weights of all
the edges in graph 𝑊 is (92 + 𝑥 ).
Corinne inspects all the routes as quickly as possible and takes 2 hours.
Find the value of 𝑥 during Corinne’s inspection.
[5]
Markscheme
recognition that edges will be repeated / there are odd vertices (M1)
BH + DG = 21, BD + GH = 15, BG + DH = 21 OR 18 + 𝑥 A1
recognizing BD and GH is lowest weight and is repeated (M1)
solution to CPP = 107 + 𝑥 A1
𝑥 = 13 A1

Note: Award M1A0M0A1A1 if only pairing BD and GH is considered, leading to a correct


answer.

[5 marks]
Examiners report
A surprising number of candidates did not seem to realize this was an application of the
Chinese Postman Problem and simply equated the given total weight to 120 minutes. Not
only does this show a lack of understanding of the problem, but it also showed a lack of
appreciation of the amount of work required to answer a 5 mark question. Out of the many
candidates who recognized the need to repeat edges connecting the odd vertices, some did
not show complete working to explain why they chose to connect 𝐵𝐷 and 𝐺𝐻, only gaining
partial credit.

(d.i)
Use the nearest neighbour algorithm to find two possible cycles.
[3]
Markscheme
attempt to use nearest neighbour algorithm (M1)
any two correct cycles from
ABCDEGHFA, AFGHBCDE(F)A, AB(A)FGHCDE(F)A A1A1
Note: Bracketed vertices may be omitted in candidate’s answer.
Award M1A0A1 for candidates who list two correct sequences of vertices, but omit the final
vertex A.

[3 marks]
Examiners report
Many candidates could successfully apply the nearest neighbour algorithm to find a correct
cycle, but some made errors finding a second one. Part (ii) was done reasonably well, with
many candidates either giving the correct answer or gaining follow-through marks for
selecting their shortest cycle from part (d)(i). A small number of candidates incorrectly
chose their longest cycle.

(d.ii)
Find the best upper bound for Daniel’s travel time.
[2]
Markscheme
use ABCDEGHFA OR their shortest cycle from (d)(i) (M1)
upper bound = 43 A1

[2 marks]
Examiners report
Many candidates could successfully apply the nearest neighbour algorithm to find a correct
cycle, but some made errors finding a second one. Part (ii) was done reasonably well, with
many candidates either giving the correct answer or gaining follow-through marks for
selecting their shortest cycle from part (d)(i). A small number of candidates incorrectly
chose their longest cycle.

(e.i)
Find the least value of 𝑥 for which the edge AF will definitely not be used by Daniel.
[2]
Markscheme
cycle starts: ABCDEGHF
return to A has two options, FA = 18 or 𝑥 (M1)
hence least value of 𝑥 = 19 A1

[2 marks]
Examiners report
This question had a mixed response. Some candidates used the table or the graph to realize
that the two choices to get from 𝐴 to 𝐹 are either 18 or 𝑥. Some incorrectly stated 𝑥 = 18.
These candidates often achieved success in part (e)(ii), making the connection to their
previous answer in part (d).
26.
[Maximum mark: 5]
21M.1.AHL.TZ1.16
An ant is walking along the edges of a wire frame in the shape of a triangular prism.

The vertices and edges of this frame can be represented by the graph below.
(a)
Write down the adjacency matrix, 𝐌, for this graph.
[3]
Markscheme
0 1 1 1 0 0
1 0 1 0 1 0
⎛1 1 0 0 0 1⎞
𝐌=⎜ ⎟ A1A1A1
⎜1 0 0 0 1 1⎟
0 1 0 1 0 1
⎝0 0 1 1 1 0⎠

Note: Award A1 for each two correct rows.

[3 marks]
(b)
Find the number of ways that the ant can start at the vertex A, and walk along exactly 6
edges to return to A.
[2]
Markscheme
calculating 𝐌 ^ (M1)
143 A1

[2 marks]

27.
[Maximum mark: 25]
21N.3.AHL.TZ0.1
This question explores how graph algorithms can be applied to a graph with
an unknown edge weight.

Graph 𝑊 is shown in the following diagram. The vertices of 𝑊 represent tourist


attractions in a city. The weight of each edge represents the travel time, to the nearest
minute, between two attractions. The route between A and F is currently being resurfaced
and this has led to a variable travel time. For this reason, AF has an unknown travel time 𝑥
minutes, where 𝑥 ∈ ℤU .

Daniel plans to visit all the attractions, starting and finishing at A. He wants to minimize
his travel time.
To find a lower bound for Daniel’s travel time, vertex A and its adjacent edges are first
deleted.
Daniel makes a table to show the minimum travel time between each pair of attractions.
Write down the value of
To find an upper bound for Daniel’s travel time, the nearest neighbour algorithm is
used, starting at vertex A.
Consider the case where 𝑥 = 3.
Consider the case where 𝑥 > 3.
(a)
Write down a Hamiltonian cycle in 𝑊.
[1]
Markscheme
e.g. ABCDEGHFA A1

Note: Accept any other correct answers starting at any vertex.

[1 mark]
Examiners report
Mostly well done, although some candidates wrote down a path instead of a cycle and some
candidates wrote a cycle that did not include all the vertices.
(b.i)
Use Prim’s algorithm, starting at vertex B, to find the weight of the minimum spanning tree
of the remaining graph. You should indicate clearly the order in which the algorithm selects
each edge.
[5]
Markscheme
7 vertices, so 6 edges required for MST (M1)

Note: To award (M1), their 6 edges should not form a cycle.

M1A1A1

Note: Award M1 for the first three edges in correct order, A1 for BH in correct order and
A1 for all of the edges correct.

weight of MST = 33 A1

Note: The final A1 can be awarded independently of previous marks.

[5 marks]
Examiners report
Many candidates could apply the algorithm correctly to find the weight of the minimum
spanning tree. A common misconception was selecting the shortest edge adjacent to the
previous vertex, instead of selecting the shortest edge adjacent to the existing tree. This
approach will not necessarily find the minimum spanning tree. A small number of
candidates found the correct minimum spanning tree, but did not show evidence of using
Prim’s algorithm, which only received partial credit; where a method/algorithm is explicit
in the question, working must be seen to demonstrate that approach. Part (b)(ii) was also
answered reasonably well, however several candidates did not read the instruction to give
their answer in terms of 𝑥, instead choosing a specific value.

(e.ii)
Hence state the value of the upper bound for Daniel’s travel time for the value of 𝑥 found in
part (e)(i).
[2]
Markscheme
upper bound = 58 A2

[2 marks]
Examiners report
This question had a mixed response. Some candidates used the table or the graph to realize
that the two choices to get from 𝐴 to 𝐹 are either 18 or 𝑥. Some incorrectly stated 𝑥 = 18.
These candidates often achieved success in part (e)(ii), making the connection to their
previous answer in part (d).

(c.i)
𝑝.
[1]
Markscheme
𝑝 = 13 A1

[1 mark]
Examiners report
Mostly well-answered.

(c.ii)
𝑞.
[1]
Markscheme
𝑞 = 17 A1

[1 mark]
Examiners report
Mostly well-answered.

(c.iii)
𝑟.
[1]
Markscheme
𝑟 = 14 A1

[1 mark]
Examiners report
Mostly well-answered.

(b.ii)
Hence, for the case where 𝑥 < 9, find a lower bound for Daniel’s travel time, in terms of 𝑥.
[2]
Markscheme
lower bound = 33 + 3 + 𝑥 (M1)
= 36 + 𝑥 A1

[2 marks]
Examiners report
Many candidates could apply the algorithm correctly to find the weight of the minimum
spanning tree. A common misconception was selecting the shortest edge adjacent to the
previous vertex, instead of selecting the shortest edge adjacent to the existing tree. This
approach will not necessarily find the minimum spanning tree. A small number of
candidates found the correct minimum spanning tree, but did not show evidence of using
Prim’s algorithm, which only received partial credit; where a method/algorithm is explicit
in the question, working must be seen to demonstrate that approach. Part (b)(ii) was
also answered reasonably well, however several candidates did not read the instruction to
give their answer in terms of 𝑥, instead choosing a specific value.

(f)
The tourist office in the city has received complaints about the lack of cleanliness of
some routes between the attractions. Corinne, the office manager, decides to inspect all the
routes between all the attractions, starting and finishing at H. The sum of the weights of all
the edges in graph 𝑊 is (92 + 𝑥 ).
Corinne inspects all the routes as quickly as possible and takes 2 hours.
Find the value of 𝑥 during Corinne’s inspection.
[5]
Markscheme
recognition that edges will be repeated / there are odd vertices (M1)
BH + DG = 21, BD + GH = 15, BG + DH = 21 OR 18 + 𝑥 A1
recognizing BD and GH is lowest weight and is repeated (M1)
solution to CPP = 107 + 𝑥 A1
𝑥 = 13 A1

Note: Award M1A0M0A1A1 if only pairing BD and GH is considered, leading to a correct


answer.
[5 marks]
Examiners report
A surprising number of candidates did not seem to realize this was an application of the
Chinese Postman Problem and simply equated the given total weight to 120 minutes. Not
only does this show a lack of understanding of the problem, but it also showed a lack of
appreciation of the amount of work required to answer a 5 mark question. Out of the many
candidates who recognized the need to repeat edges connecting the odd vertices, some did
not show complete working to explain why they chose to connect 𝐵𝐷 and 𝐺𝐻, only gaining
partial credit.

(d.i)
Use the nearest neighbour algorithm to find two possible cycles.
[3]
Markscheme
attempt to use nearest neighbour algorithm (M1)
any two correct cycles from
ABCDEGHFA, AFGHBCDE(F)A, AB(A)FGHCDE(F)A A1A1

Note: Bracketed vertices may be omitted in candidate’s answer.


Award M1A0A1 for candidates who list two correct sequences of vertices, but omit the final
vertex A.

[3 marks]
Examiners report
Many candidates could successfully apply the nearest neighbour algorithm to find a correct
cycle, but some made errors finding a second one. Part (ii) was done reasonably well, with
many candidates either giving the correct answer or gaining follow-through marks for
selecting their shortest cycle from part (d)(i). A small number of candidates incorrectly
chose their longest cycle.

(d.ii)
Find the best upper bound for Daniel’s travel time.
[2]
Markscheme
use ABCDEGHFA OR their shortest cycle from (d)(i) (M1)
upper bound = 43 A1
[2 marks]
Examiners report
Many candidates could successfully apply the nearest neighbour algorithm to find a correct
cycle, but some made errors finding a second one. Part (ii) was done reasonably well, with
many candidates either giving the correct answer or gaining follow-through marks for
selecting their shortest cycle from part (d)(i). A small number of candidates incorrectly
chose their longest cycle.

(e.i)
Find the least value of 𝑥 for which the edge AF will definitely not be used by Daniel.
[2]
Markscheme
cycle starts: ABCDEGHF
return to A has two options, FA = 18 or 𝑥 (M1)
hence least value of 𝑥 = 19 A1

[2 marks]
Examiners report
This question had a mixed response. Some candidates used the table or the graph to realize
that the two choices to get from 𝐴 to 𝐹 are either 18 or 𝑥. Some incorrectly stated 𝑥 = 18.
These candidates often achieved success in part (e)(ii), making the connection to their
previous answer in part (d).
28.
[Maximum mark: 7]
21M.1.AHL.TZ2.11
The diagram below shows a network of roads in a small village with the weights
indicating the distance of each road, in metres, and junctions indicated with letters.

Musab is required to deliver leaflets to every house on each road. He wishes to minimize
his total distance.

(a)
Musab starts and finishes from the village bus-stop at A. Determine the total
distance Musab will need to walk.
[5]
Markscheme
Odd vertices are A, B, D, H A1
Consider pairings: M1

Note: Award (M1) if there are four vertices not necessarily all correct.

AB DH has shortest route AD, DE, EB and DE, EH,


so repeated edges (19 + 16 + 19) + (16 + 27) = 97

Note: Condone AB in place of AD, DE, EB giving 56 + (16 + 27) = 99.

AD BH has shortest route AD and BE, EH,


so repeated edges 19 + (19 + 27) = 65
AH BD has shortest route AD, DE, EH and BE, ED,
so repeated edges (19 + 16 + 27) + (19 + 16) = 97 A2

Note: Award A1 if only one or two pairings are correctly considered.

so best pairing is AD, BH


weight of route is therefore 582 + 65 = 647 A1

[5 marks]
(b)
Instead of having to catch the bus to the village, Musab’s sister offers to drop him off at
any junction and pick him up at any other junction of his choice.
Explain which junctions Musab should choose as his starting and finishing points.
[2]
Markscheme
least value of the pairings is 19 therefore repeat AD R1
B and H A1

Note: Do not award R0A1.

[2 marks]
29.
[Maximum mark: 8]
20N.1.AHL.TZ0.F_2
The following diagram shows the graph 𝐺.

(a)
Verify that 𝐺 satisfies the handshaking lemma.
[3]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.
METHOD 1
sum of degrees of vertices = 3 + 5 + 5 + 5 + 4 + 4 = 26 A1
number of edges 𝑒 = 13 A1
the sum is equal to twice the number of edges which
verifies the handshaking lemma R1

METHOD 2
degrees of vertices = 3,5,5,5,4,4 A1
there are 4 vertices of odd order A1
there is an even number of vertices of odd order
which verifies the handshaking lemma R1

[3 marks]

(b)
Show that 𝐺 cannot be redrawn as a planar graph.
[3]
Markscheme
if planar then 𝑒 ≤ 3𝑣 − 6 M1
𝑒 = 13, 𝑣 = 6 A1
inequality not satisfied R1
therefore 𝐺 is not planar AG

Note: method explaining that the graph contains 𝜅>,> is acceptable.

[3 marks]

(c)
State, giving a reason, whether 𝐺 contains an Eulerian circuit.
[2]
Markscheme
there are vertices of odd degree R1
hence it does not contain an Eulerian circuit A1

Note: Do not award R0A1.

[2 marks]
30.
[Maximum mark: 11]
20N.3.AHL.TZ0.Hdm_5
𝐺 is a simple, connected, planar graph with 9 vertices and 𝑒 edges.
The complement of 𝐺 has 𝑒′ edges.
(a)
Find the maximum possible value of 𝑒.
[2]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.
substitutes 𝑣 = 9 into either 𝑒 = 3𝑣 − 6 or 𝑒 ≤ 3𝑣 − 6 (M1)
the maximum number of edges is 21 (𝑒 ≤ 21) A1

[2 marks]
(b)
Find an expression for 𝑒′ in terms of 𝑒.
[2]
Markscheme

9
𝜅d has eF G =f 36 edges (A1)
2
9
so 𝑒′ = 36 − 𝑒 F= F G − 𝑒G A1
2

[2 marks]

(c)
Given that the complement of 𝐺 is also planar and connected, find the possible values of 𝑒.
[2]
Markscheme
𝑒′ ≤ 21 ⇒ 36 − 𝑒 ≤ 21 (M1)
15 ≤ 𝑒 ≤ 21 (the possible values are 15, 16, 17, 18, 19, 20 and 21) A1

[2 marks]
(d)
𝐻 is a simple graph with 𝑣 vertices and 𝑒 edges.
Given that both 𝐻 and its complement are planar and connected, find the
maximum possible value of 𝑣.
[5]
Markscheme
g(gJK)
recognises that 𝑒 + 𝑒′ = =
(or equivalent) (A1)

uses 𝑒 ≤ 3𝑣 − 6 and 𝑒′ ≤ 3𝑣 − 6 M1
g(gJK)
to form =
− (3𝑣 − 6) ≤ 3𝑣 − 6 A1

g(gJK)
Note: Award A1 for =
− (3𝑣 − 6) = 3𝑣 − 6.

attempts to solve their quadratic inequality (equality) (M1)


𝑣 = − 13𝑣 + 24 ≤ 0 ⇒ 2.228 … ≤ 𝑣 ≤ 10.77 …
the maximum possible value of 𝑣 is 10 (𝑣 ≤ 10) A1

[5 marks]
31.
[Maximum mark: 12]
20N.3.AHL.TZ0.Hdm_2
Christine and her friends live in Winnipeg, Canada. The weighted graph shows the location
of their houses and the time, in minutes, to travel between each house.
Christine’s house is located at vertex C.
(a.i)
Use Dijkstra’s algorithm to find the shortest time to travel from C to F, clearly showing how
the algorithm has been applied.
[6]
Markscheme
attempts to construct a graph or table to represent Dijkstra’s algorithm M1
EITHER
OR

a clear attempt at Step 1 (C, D, H and B considered) M1


Steps 2 and 3 correctly completed A1
Step 4 (A : 44 → 36) correctly completed A1
Steps 5 and 6 (E : 41 → 40 and F : 58 → 57 or 57 → 55 or 58 → 55) correctly completed
A1
shortest time = 55 (mins) A1

[6 marks]
(a.ii)
Hence write down the shortest path from C to F.
[1]
Markscheme
CHGEF A1
Note: Award A1 only if it is clear that Dijkstra’s algorithm has been attempted in part (a)
(i). This A1 can be awarded if the candidate attempts to use Dijkstra’s algorithm but
neglects to state 55 (mins).

[1 mark]

(b)
A new road is constructed that allows Christine to travel from H to A in 𝑡 minutes. If
Christine starts from home and uses this new road her minimum travel time to A is
reduced, but her minimum travel time to F remains the same.
Find the possible values of 𝑡.
[5]
Markscheme
minimum travel time from C to A is reduced
CHA is now 12 + 𝑡 (mins) (M1)
CBA is still 25 + 11 (mins)
so 12 + 𝑡 < 36 (𝑡 < 24) (A1)

Note: Condone 𝑡 ≤ 24.

travel time from C to F remains the same (55 mins)


CHAF is now 12 + 𝑡 + 21 (mins) (M1)
12 + 𝑡 + 21 ≥ 55 (𝑡 ≥ 22) (A1)
so 22 ≤ 𝑡 < 24 A1

Note: Accept 𝑡 = 22, 23.

[5 marks]
32.
[Maximum mark: 7]
21M.1.AHL.TZ1.10
An engineer plans to visit six oil rigs (A– F) in the Gulf of Mexico, starting and finishing at
A. The travelling time, in minutes, between each of the rigs is shown in the table.
The data above can be represented by a graph 𝐺.
(a.i)
Use Prim’s algorithm to find the weight of the minimum spanning tree of the subgraph of 𝐺
obtained by deleting A and starting at B. List the order in which the edges are selected.
[4]
Markscheme
use of Prim’s algorithm M1
BC 46 A1
BD 58 A1
DE 23
EF 47
Total 174 A1

Note: Award M0A0A0A1 for 174 without correct working e.g. use of Kruskal’s, or with no
working.
Award M1A0A0A1 for 174 by using Prim’s from an incorrect starting point.

[4 marks]
(a.ii)
Hence find a lower bound for the travelling time needed to visit all the oil rigs.
[2]
Markscheme
AB + AC = 55 + 63 = 118 (M1)
174 + 118 = 292 minutes A1

[2 marks]

(b)
Describe how an improved lower bound might be found.
[1]
Markscheme
delete a different vertex A1

[1 mark]

33.
[Maximum mark: 12]
20N.3.AHL.TZ0.Hdm_2
Christine and her friends live in Winnipeg, Canada. The weighted graph shows the location
of their houses and the time, in minutes, to travel between each house.

Christine’s house is located at vertex C.


(a.i)
Use Dijkstra’s algorithm to find the shortest time to travel from C to F, clearly showing how
the algorithm has been applied.
[6]
Markscheme
attempts to construct a graph or table to represent Dijkstra’s algorithm M1
EITHER

OR

a clear attempt at Step 1 (C, D, H and B considered) M1


Steps 2 and 3 correctly completed A1
Step 4 (A : 44 → 36) correctly completed A1
Steps 5 and 6 (E : 41 → 40 and F : 58 → 57 or 57 → 55 or 58 → 55) correctly completed
A1
shortest time = 55 (mins) A1

[6 marks]
(a.ii)
Hence write down the shortest path from C to F.
[1]
Markscheme
CHGEF A1
Note: Award A1 only if it is clear that Dijkstra’s algorithm has been attempted in part (a)
(i). This A1 can be awarded if the candidate attempts to use Dijkstra’s algorithm but
neglects to state 55 (mins).

[1 mark]

(b)
A new road is constructed that allows Christine to travel from H to A in 𝑡 minutes. If
Christine starts from home and uses this new road her minimum travel time to A is
reduced, but her minimum travel time to F remains the same.
Find the possible values of 𝑡.
[5]
Markscheme
minimum travel time from C to A is reduced
CHA is now 12 + 𝑡 (mins) (M1)
CBA is still 25 + 11 (mins)
so 12 + 𝑡 < 36 (𝑡 < 24) (A1)

Note: Condone 𝑡 ≤ 24.

travel time from C to F remains the same (55 mins)


CHAF is now 12 + 𝑡 + 21 (mins) (M1)
12 + 𝑡 + 21 ≥ 55 (𝑡 ≥ 22) (A1)
so 22 ≤ 𝑡 < 24 A1

Note: Accept 𝑡 = 22, 23.

[5 marks]
34.
[Maximum mark: 11]
20N.3.AHL.TZ0.Hdm_5
𝐺 is a simple, connected, planar graph with 9 vertices and 𝑒 edges.
The complement of 𝐺 has 𝑒′ edges.
(a)
Find the maximum possible value of 𝑒.
[2]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.
substitutes 𝑣 = 9 into either 𝑒 = 3𝑣 − 6 or 𝑒 ≤ 3𝑣 − 6 (M1)
the maximum number of edges is 21 (𝑒 ≤ 21) A1

[2 marks]

(b)
Find an expression for 𝑒′ in terms of 𝑒.
[2]
Markscheme

9
𝜅d has eF G =f 36 edges (A1)
2
9
so 𝑒′ = 36 − 𝑒 F= F G − 𝑒G A1
2

[2 marks]

(c)
Given that the complement of 𝐺 is also planar and connected, find the possible values of 𝑒.
[2]
Markscheme
𝑒′ ≤ 21 ⇒ 36 − 𝑒 ≤ 21 (M1)
15 ≤ 𝑒 ≤ 21 (the possible values are 15, 16, 17, 18, 19, 20 and 21) A1

[2 marks]

(d)
𝐻 is a simple graph with 𝑣 vertices and 𝑒 edges.
Given that both 𝐻 and its complement are planar and connected, find the
maximum possible value of 𝑣.
[5]
Markscheme
g(gJK)
recognises that 𝑒 + 𝑒′ = =
(or equivalent) (A1)

uses 𝑒 ≤ 3𝑣 − 6 and 𝑒′ ≤ 3𝑣 − 6 M1
g(gJK)
to form =
− (3𝑣 − 6) ≤ 3𝑣 − 6 A1

g(gJK)
Note: Award A1 for =
− (3𝑣 − 6) = 3𝑣 − 6.

attempts to solve their quadratic inequality (equality) (M1)


𝑣 = − 13𝑣 + 24 ≤ 0 ⇒ 2.228 … ≤ 𝑣 ≤ 10.77 …
the maximum possible value of 𝑣 is 10 (𝑣 ≤ 10) A1

[5 marks]
35.
[Maximum mark: 25]
21N.3.AHL.TZ0.1
This question explores how graph algorithms can be applied to a graph with
an unknown edge weight.

Graph 𝑊 is shown in the following diagram. The vertices of 𝑊 represent tourist


attractions in a city. The weight of each edge represents the travel time, to the nearest
minute, between two attractions. The route between A and F is currently being resurfaced
and this has led to a variable travel time. For this reason, AF has an unknown travel time 𝑥
minutes, where 𝑥 ∈ ℤU .
Daniel plans to visit all the attractions, starting and finishing at A. He wants to minimize
his travel time.
To find a lower bound for Daniel’s travel time, vertex A and its adjacent edges are first
deleted.
Daniel makes a table to show the minimum travel time between each pair of attractions.

Write down the value of


To find an upper bound for Daniel’s travel time, the nearest neighbour algorithm is
used, starting at vertex A.
Consider the case where 𝑥 = 3.
Consider the case where 𝑥 > 3.
(a)
Write down a Hamiltonian cycle in 𝑊.
[1]
Markscheme
e.g. ABCDEGHFA A1

Note: Accept any other correct answers starting at any vertex.

[1 mark]
Examiners report
Mostly well done, although some candidates wrote down a path instead of a cycle and some
candidates wrote a cycle that did not include all the vertices.

(b.i)
Use Prim’s algorithm, starting at vertex B, to find the weight of the minimum spanning tree
of the remaining graph. You should indicate clearly the order in which the algorithm selects
each edge.
[5]
Markscheme
7 vertices, so 6 edges required for MST (M1)

Note: To award (M1), their 6 edges should not form a cycle.


M1A1A1

Note: Award M1 for the first three edges in correct order, A1 for BH in correct order and
A1 for all of the edges correct.

weight of MST = 33 A1

Note: The final A1 can be awarded independently of previous marks.

[5 marks]
Examiners report
Many candidates could apply the algorithm correctly to find the weight of the minimum
spanning tree. A common misconception was selecting the shortest edge adjacent to the
previous vertex, instead of selecting the shortest edge adjacent to the existing tree. This
approach will not necessarily find the minimum spanning tree. A small number of
candidates found the correct minimum spanning tree, but did not show evidence of using
Prim’s algorithm, which only received partial credit; where a method/algorithm is explicit
in the question, working must be seen to demonstrate that approach. Part (b)(ii) was also
answered reasonably well, however several candidates did not read the instruction to give
their answer in terms of 𝑥, instead choosing a specific value.
(e.ii)
Hence state the value of the upper bound for Daniel’s travel time for the value of 𝑥 found in
part (e)(i).
[2]
Markscheme
upper bound = 58 A2

[2 marks]
Examiners report
This question had a mixed response. Some candidates used the table or the graph to realize
that the two choices to get from 𝐴 to 𝐹 are either 18 or 𝑥. Some incorrectly stated 𝑥 = 18.
These candidates often achieved success in part (e)(ii), making the connection to their
previous answer in part (d).
(c.i)
𝑝.
[1]
Markscheme
𝑝 = 13 A1

[1 mark]
Examiners report
Mostly well-answered.

(c.ii)
𝑞.
[1]
Markscheme
𝑞 = 17 A1

[1 mark]
Examiners report
Mostly well-answered.
(c.iii)
𝑟.
[1]
Markscheme
𝑟 = 14 A1

[1 mark]
Examiners report
Mostly well-answered.

(b.ii)
Hence, for the case where 𝑥 < 9, find a lower bound for Daniel’s travel time, in terms of 𝑥.
[2]
Markscheme
lower bound = 33 + 3 + 𝑥 (M1)
= 36 + 𝑥 A1

[2 marks]
Examiners report
Many candidates could apply the algorithm correctly to find the weight of the minimum
spanning tree. A common misconception was selecting the shortest edge adjacent to the
previous vertex, instead of selecting the shortest edge adjacent to the existing tree. This
approach will not necessarily find the minimum spanning tree. A small number of
candidates found the correct minimum spanning tree, but did not show evidence of using
Prim’s algorithm, which only received partial credit; where a method/algorithm is explicit
in the question, working must be seen to demonstrate that approach. Part (b)(ii) was
also answered reasonably well, however several candidates did not read the instruction to
give their answer in terms of 𝑥, instead choosing a specific value.

(f)
The tourist office in the city has received complaints about the lack of cleanliness of
some routes between the attractions. Corinne, the office manager, decides to inspect all the
routes between all the attractions, starting and finishing at H. The sum of the weights of all
the edges in graph 𝑊 is (92 + 𝑥 ).
Corinne inspects all the routes as quickly as possible and takes 2 hours.
Find the value of 𝑥 during Corinne’s inspection.
[5]
Markscheme
recognition that edges will be repeated / there are odd vertices (M1)
BH + DG = 21, BD + GH = 15, BG + DH = 21 OR 18 + 𝑥 A1
recognizing BD and GH is lowest weight and is repeated (M1)
solution to CPP = 107 + 𝑥 A1
𝑥 = 13 A1

Note: Award M1A0M0A1A1 if only pairing BD and GH is considered, leading to a correct


answer.

[5 marks]
Examiners report
A surprising number of candidates did not seem to realize this was an application of the
Chinese Postman Problem and simply equated the given total weight to 120 minutes. Not
only does this show a lack of understanding of the problem, but it also showed a lack of
appreciation of the amount of work required to answer a 5 mark question. Out of the many
candidates who recognized the need to repeat edges connecting the odd vertices, some did
not show complete working to explain why they chose to connect 𝐵𝐷 and 𝐺𝐻, only gaining
partial credit.

(d.i)
Use the nearest neighbour algorithm to find two possible cycles.
[3]
Markscheme
attempt to use nearest neighbour algorithm (M1)
any two correct cycles from
ABCDEGHFA, AFGHBCDE(F)A, AB(A)FGHCDE(F)A A1A1
Note: Bracketed vertices may be omitted in candidate’s answer.
Award M1A0A1 for candidates who list two correct sequences of vertices, but omit the final
vertex A.

[3 marks]
Examiners report
Many candidates could successfully apply the nearest neighbour algorithm to find a correct
cycle, but some made errors finding a second one. Part (ii) was done reasonably well, with
many candidates either giving the correct answer or gaining follow-through marks for
selecting their shortest cycle from part (d)(i). A small number of candidates incorrectly
chose their longest cycle.

(d.ii)
Find the best upper bound for Daniel’s travel time.
[2]
Markscheme
use ABCDEGHFA OR their shortest cycle from (d)(i) (M1)
upper bound = 43 A1

[2 marks]
Examiners report
Many candidates could successfully apply the nearest neighbour algorithm to find a correct
cycle, but some made errors finding a second one. Part (ii) was done reasonably well, with
many candidates either giving the correct answer or gaining follow-through marks for
selecting their shortest cycle from part (d)(i). A small number of candidates incorrectly
chose their longest cycle.

(e.i)
Find the least value of 𝑥 for which the edge AF will definitely not be used by Daniel.
[2]
Markscheme
cycle starts: ABCDEGHF
return to A has two options, FA = 18 or 𝑥 (M1)
hence least value of 𝑥 = 19 A1

[2 marks]
Examiners report
This question had a mixed response. Some candidates used the table or the graph to realize
that the two choices to get from 𝐴 to 𝐹 are either 18 or 𝑥. Some incorrectly stated 𝑥 = 18.
These candidates often achieved success in part (e)(ii), making the connection to their
previous answer in part (d).
36.
[Maximum mark: 8]
20N.1.AHL.TZ0.F_2
The following diagram shows the graph 𝐺.

(a)
Verify that 𝐺 satisfies the handshaking lemma.
[3]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.
METHOD 1
sum of degrees of vertices = 3 + 5 + 5 + 5 + 4 + 4 = 26 A1
number of edges 𝑒 = 13 A1
the sum is equal to twice the number of edges which
verifies the handshaking lemma R1

METHOD 2
degrees of vertices = 3,5,5,5,4,4 A1
there are 4 vertices of odd order A1
there is an even number of vertices of odd order
which verifies the handshaking lemma R1

[3 marks]

(b)
Show that 𝐺 cannot be redrawn as a planar graph.
[3]
Markscheme
if planar then 𝑒 ≤ 3𝑣 − 6 M1
𝑒 = 13, 𝑣 = 6 A1
inequality not satisfied R1
therefore 𝐺 is not planar AG

Note: method explaining that the graph contains 𝜅>,> is acceptable.

[3 marks]

(c)
State, giving a reason, whether 𝐺 contains an Eulerian circuit.
[2]
Markscheme
there are vertices of odd degree R1
hence it does not contain an Eulerian circuit A1

Note: Do not award R0A1.

[2 marks]
37.
[Maximum mark: 7]
21M.1.AHL.TZ2.11
The diagram below shows a network of roads in a small village with the weights
indicating the distance of each road, in metres, and junctions indicated with letters.

Musab is required to deliver leaflets to every house on each road. He wishes to minimize
his total distance.

(a)
Musab starts and finishes from the village bus-stop at A. Determine the total
distance Musab will need to walk.
[5]
Markscheme
Odd vertices are A, B, D, H A1
Consider pairings: M1

Note: Award (M1) if there are four vertices not necessarily all correct.

AB DH has shortest route AD, DE, EB and DE, EH,


so repeated edges (19 + 16 + 19) + (16 + 27) = 97

Note: Condone AB in place of AD, DE, EB giving 56 + (16 + 27) = 99.

AD BH has shortest route AD and BE, EH,


so repeated edges 19 + (19 + 27) = 65
AH BD has shortest route AD, DE, EH and BE, ED,
so repeated edges (19 + 16 + 27) + (19 + 16) = 97 A2

Note: Award A1 if only one or two pairings are correctly considered.

so best pairing is AD, BH


weight of route is therefore 582 + 65 = 647 A1

[5 marks]
(b)
Instead of having to catch the bus to the village, Musab’s sister offers to drop him off at
any junction and pick him up at any other junction of his choice.
Explain which junctions Musab should choose as his starting and finishing points.
[2]
Markscheme
least value of the pairings is 19 therefore repeat AD R1
B and H A1

Note: Do not award R0A1.

[2 marks]
38.
[Maximum mark: 7]
21M.1.AHL.TZ1.10
An engineer plans to visit six oil rigs (A– F) in the Gulf of Mexico, starting and finishing at
A. The travelling time, in minutes, between each of the rigs is shown in the table.

The data above can be represented by a graph 𝐺.


(a.i)
Use Prim’s algorithm to find the weight of the minimum spanning tree of the subgraph of 𝐺
obtained by deleting A and starting at B. List the order in which the edges are selected.
[4]
Markscheme
use of Prim’s algorithm M1
BC 46 A1
BD 58 A1
DE 23
EF 47
Total 174 A1

Note: Award M0A0A0A1 for 174 without correct working e.g. use of Kruskal’s, or with no
working.
Award M1A0A0A1 for 174 by using Prim’s from an incorrect starting point.

[4 marks]

(a.ii)
Hence find a lower bound for the travelling time needed to visit all the oil rigs.
[2]
Markscheme
AB + AC = 55 + 63 = 118 (M1)
174 + 118 = 292 minutes A1

[2 marks]
(b)
Describe how an improved lower bound might be found.
[1]
Markscheme
delete a different vertex A1

[1 mark]

39.
[Maximum mark: 28]
22M.3.AHL.TZ2.2
This question compares possible designs for a new computer network
between multiple school buildings, and whether they meet specific requirements.

A school’s administration team decides to install new fibre-optic internet cables


underground. The school has eight buildings that need to be connected by these cables. A
map of the school is shown below, with the internet access point of each building labelled
A–H.
Jonas is planning where to install the underground cables. He begins by determining
the distances, in metres, between the underground access points in each of the buildings.
k F = 83∘.
He finds AD = 89.2 m, DF = 104.9 m and AD
The cost for installing the cable directly between A and F is $21 310.
Jonas estimates that it will cost $110 per metre to install the cables between all the other
buildings.
Jonas creates the following graph, 𝑆, using the cost of installing the cables between
two buildings as the weight of each edge.

The computer network could be designed such that each building is directly connected to
at least one other building and hence all buildings are indirectly connected.
The computer network fails if any part of it becomes unreachable from any other part. To
help protect the network from failing, every building could be connected to at least two
other buildings. In this way if one connection breaks, the building is still part of
the computer network. Jonas can achieve this by finding a Hamiltonian cycle within the
graph.
After more research, Jonas decides to install the cables as shown in the diagram below.

Each individual cable is installed such that each end of the cable is connected to a building’s
access point. The connection between each end of a cable and an access point has a 1.4%
probability of failing after a power surge.
For the network to be successful, each building in the network must be able to
communicate with every other building in the network. In other words, there must be a
path that connects any two buildings in the network. Jonas would like the network to have
less than a 2% probability of failing to operate after a power surge.
(a)
Find AF.
[3]
Markscheme

AF= = 89.2= + 104.9= − 2(89.2)(104.9)cos 83 (M1)(A1)

Note: Award (M1) for substitution into the cosine rule and (A1) for correct substitution.
AF = 129 m (129.150 … ) A1

[3 marks]
Examiners report
This question part was intended to be an easy introduction to help candidates begin
working with the larger story and most candidates handled it well. However, it was
surprisingly common for a candidate to correctly choose the cosine rule and to make the
correct substitutions into the formula but then arrive at an incorrect answer. The
frequency of this mistake suggests that candidates were either making simple entry
mistakes into their GDC or forgetting to ensure that their GDC was set to degrees rather
than radians.

(b)
Find the cost per metre of installing this cable.
[2]
Markscheme
21310 ÷ 129.150 … (M1)
$165 A1

[2 marks]
Examiners report
(b) and (c) Most candidates were able to gain the three marks available.

(c)
State why the cost for installing the cable between A and F would be higher than between
the other buildings.
[1]
Markscheme
any reasonable statement referring to the lake R1
(eg. there is a lake between A and F, the cables would need to be installed
under/over/around the lake, special waterproof cables are needed for lake, etc.)

[1 mark]

(d.i)
By using Kruskal’s algorithm, find the minimum spanning tree for 𝑆, showing clearly the
order in which edges are added.
[3]
Markscheme
edges (or weights) are chosen in the order
CE (8239)
DG (8668)
BD (8778)
AB (8811)
DE (8833)
EH (9251)
DF (11 539) A1A1A1

Note: Award A1 for the first two edges chosen in the correct order. Award A1A1 for the
first six edges chosen in the correct order. Award A1A1A1 for all seven edges chosen in the
correct order. Accept a diagram as an answer, provided the order of edges is
communicated.

[3 marks]
Examiners report
(d), (f) and (g) These three question parts required candidates to demonstrate their ability
to carry out graph theory algorithms. Kruskal’s algorithm was split into two different
question parts to guide candidates to show their work. As a result, many were able to score
well in part (d)(ii) either from having the correct MST or from “follow through” marks from
an incorrect MST. However, without this guidance in 2(f) and 2(g), many candidates did a
poor job of showing the process they were using to apply the algorithms. The candidates
that scored well were detailed in showing the order of how edges were selected and how
they were being summed to arrive at the final answers. Although “follow through” within
the problem was not available for the final answer in parts 2(f) and 2(g), many candidates
missed the opportunity to gain the final method mark in both parts by not fully showing the
process they used.
(e)
State why a path that forms a Hamiltonian cycle does not always form an Eulerian circuit.
[1]
Markscheme
a Hamiltonian cycle is not always an Eulerian circuit as it does not have to include all edges
of the graph (only all vertices) R1
[1 mark]
Examiners report
Many candidates were able to state the definitions of Hamiltonian cycles and Eulerian
circuits. However, the question was not asking for definitions but rather a distinct
conclusion of why a Hamiltonian cycle is not always an Eulerian circuit. Disappointingly,
many incorrect answers contained five or more lines or writing that may have used up
exam time that could have been devoted to other question parts. Another common mistake
seen here was candidates incorrectly trying to state a reason based on the number of odd
vertices.

(d.ii)
Hence find the minimum installation cost for the cables that would allow all the buildings
to be part of the computer network.
[2]
Markscheme
Finding the sum of the weights of their edges (M1)
8239 + 8668 + 8778 + 8811 + 8833 + 9251 + 11539
total cost = $64119 A1

[2 marks]

(f)
Starting at D, use the nearest neighbour algorithm to find the upper bound for
the installation cost of a computer network in the form of a Hamiltonian cycle.
Note: Although the graph is not complete, in this instance it is not necessary to form a table
of least distances.
[5]
Markscheme
edges (or weights) are chosen in the order
DG (8668)
GH (9603)
HE (9251)
EC (8239)
CB (13 156)
BA (8811)
AF (21 310)
FD (11 539) A1A1A1

Note: Award A1 for the first two edges chosen in the correct order. Award A1A1 for the
first five edges chosen in the correct order. Award A1A1A1 for all eight edges chosen in the
correct order. Accept a diagram as an answer, provided the order of edges is
communicated.

finding the sum of the weights of their edges (M1)


8668 + 9603 + 9251 + 8239 + 13156 + 8811 + 21310 + 11539
upper bound = $90 577 A1
[5 marks]

(g)
By deleting D, use the deleted vertex algorithm to find the lower bound for the installation
cost of the cycle.
[6]
Markscheme
attempt to find MST after deleting vertex D (M1)
these edges (or weights) (in any order)
CE (8239)
AB (8811)
EH (9251)
GH (9603)
BE (10 153)
FG (12 606) A1

Note: Prim’s or Kruskal’s algorithm could be used at this stage.

reconnect D to MST with two different edges (M1)


DG (8668)
BD (8778) A1

Note: This A1 is independent of the first A mark and can be awarded if both DG and BD are
chosen to reconnect D to the MST, even if the MST is incorrect.

finding the sum of the weights of their edges (M1)


8239 + 8811 + 9251 + 9603 + 10153 + 12606 + 8668 + 8778

Note: For candidates with an incorrect MST or no MST, the weights of at least seven of the
edges being summed (two of which must connect to D) must be shown to award this (M1).

lower bound = $76 109 A1


[6 marks]

(h)
Show that Jonas’s network satisfies the requirement of there being less than a 2%
probability of the network failing after a power surge.
[5]
Markscheme
METHOD 1
recognition of a binomial distribution (M1)
𝑋 ∼ B(2, 0.014)
finding the probability that a cable fails (at least one of its connections fails)
P(𝑋 > 0) = 0.027804 OR 1 − P(𝑋 = 0) = 0.027804 A1
recognition that two cables must fail for the network to go offline M1
recognition of binomial distribution for network, 𝑌 ∼ B(8, 0.027804) (M1)
P(𝑌 ≥ 2) = 0.0194 (0.0193602 … ) OR 1 − P(𝑌 < 2) = 0.0194 (0.0193602 … ) A1
therefore, the diagram satisfies the requirement since 1.94% < 2% AG

Note: Evidence of binomial distribution may be seen as combinations.

METHOD 2
recognition of a binomial distribution (M1)
𝑋 ∼ B(16, 0.014)
finding the probability that at least two connections fail
P(𝑋 ≥ 2) = 0.0206473 … OR 1 − P(𝑋 < 2) = 0.0206473 … A1
recognition that the previous answer is an overestimate M1
finding probability of two ends of the same cable failing, 𝐹 ∼ B(2, 0.014),
and the ends of the other 14 cables not failing, 𝑆 ∼ B(14, 0.014)
P(𝐹 = 2) × P(𝑆 = 0) = 0.0000160891 … (A1)

0.0000160891 … × 8 = 0.00128713. ..
0.0206473 … − 0.00128713 … = 0.0194 (0.0193602 … ) A1
therefore, the diagram satisfies the requirement since 1.94% < 2% AG

METHOD 3
recognition of a binomial distribution M1
𝑋 ∼ B(16, 0.014)
finding the probability that the network remains secure if 0 or 1 connections fail or if 2
connections fail provided that the second failed connection occurs at the other end of the
cable with the first failure (M1)
K
P(remains secure) = P(𝑋 ≤ 1) + KO × P(𝑋 = 2) A1

= 0.9806397625 A1
P(network fails) = 1 − 0.9806397625 = 0.0194 (0.0193602 … ) A1
therefore, the diagram satisfies the requirement since 1.94% < 2% AG
METHOD 4
P(network failing)
= 1 − P(0 connections failing) − P(1 connection failing) −
P(2 connections on the same cable failing) M1
=1-0.98616-C116×0.014×0.98615-C18×0.0142×0.98614 A1A1A1

Note: Award A1 for each of 2nd, 3rd and last terms.

= 0.0194 (0.0193602 … ) A1
therefore, the diagram satisfies the requirement since 1.94% < 2% AG

[5 marks]
Examiners report
This question was very challenging for almost all the candidates. Although there were
several different methods that candidates could have used to answer this question, most
candidates were only able to gain one or two marks here. Many candidates did recognize
that something binomial was needed, but few knew how to setup the correct parameters
for the distribution.
40.
[Maximum mark: 5]
21M.1.AHL.TZ1.16
An ant is walking along the edges of a wire frame in the shape of a triangular prism.
The vertices and edges of this frame can be represented by the graph below.

(a)
Write down the adjacency matrix, 𝐌, for this graph.
[3]
Markscheme
0 1 1 1 0 0
1 0 1 0 1 0
⎛1 1 0 0 0 1⎞
𝐌=⎜ ⎟ A1A1A1
⎜1 0 0 0 1 1⎟
0 1 0 1 0 1
⎝0 0 1 1 1 0⎠

Note: Award A1 for each two correct rows.

[3 marks]

(b)
Find the number of ways that the ant can start at the vertex A, and walk along exactly 6
edges to return to A.
[2]
Markscheme
calculating 𝐌 ^ (M1)
143 A1

[2 marks]
41.
[Maximum mark: 27]
22M.3.AHL.TZ1.2
This question is about a metropolitan area council planning a new town and the
location of a new toxic waste dump.

A metropolitan area in a country is modelled as a square. The area has four towns, located
at the corners of the square. All units are in kilometres with the 𝑥-coordinate representing
the distance east and the 𝑦-coordinate representing the distance north from the origin at
(0, 0).
• Edison is modelled as being positioned at E(0, 40).
• Fermitown is modelled as being positioned at F(40, 40).
• Gaussville is modelled as being positioned at G(40, 0).
• Hamilton is modelled as being positioned at H(0, 0).
The metropolitan area council decides to build a new town called Isaacopolis located at
I(30, 20).
A new Voronoi diagram is to be created to include Isaacopolis. The equation of the
> KO
perpendicular bisector of [IE] is 𝑦 = = 𝑥 + = .

The metropolitan area is divided into districts based on the Voronoi regions found in part
(c).
A toxic waste dump needs to be located within the metropolitan area. The council wants to
locate it as far as possible from the nearest town.
The toxic waste dump, T, is connected to the towns via a system of sewers.
The connections are represented in the following matrix, 𝐌, where the order of rows and
columns is (E, F, G, H, I, T).
1 0 1 1 0 0
0 1 0 0 0 1
⎛1 0 1 0 1 0⎞
𝐌=⎜ ⎟
⎜1 0 0 1 0 1⎟
0 0 1 0 1 0
⎝0 1 0 1 0 1⎠
A leak occurs from the toxic waste dump and travels through the sewers. The pollution
takes one day to travel between locations that are directly connected.
The digit 1 in 𝐌 represents a direct connection. The values of 1 in the leading diagonal of 𝐌
mean that once a location is polluted it will stay polluted.
(a)
The model assumes that each town is positioned at a single point. Describe possible
circumstances in which this modelling assumption is reasonable.
[1]
Markscheme
the size of each town is small (in comparison with the distance between the towns)
OR
if towns have an identifiable centre
OR
the centre of the town is at that point R1

Note: Accept a geographical landmark in place of “centre”, e.g. “town hall” or “capitol”.

[1 mark]
Examiners report
Question 2 was based on Voronoi diagrams, but a substantial number of candidates
appeared to have not met this topic.
2(a) was generally well answered, although a strangely common answer was to claim that
the towns must be 1km by 1km! Perhaps this came from thinking of coordinates as
representing pixels rather than points.
2(b) was done well by most candidates who knew what a Voronoi diagram was.
2(c)(i) showed some poor planning skills by many candidates who found a line
perpendicular to the given Voronoi edge rather than finding the gradient of IF.
In 2(c)(ii) candidates would have benefited from taking a step back and thinking about the
symmetry of the situation before unthinkingly intersecting a lot of lines.
2(c)(iii) was done well by some, but many did not seem to have any intuition for the effect
of adding a point to a Voronoi diagram.
2(d) was probably the worst answered question. Candidates did not seem to have the
problem-solving tools to deal with this slightly unfamiliar situation.
In 2(e) many candidates clearly did not know that the solution to the toxic waste problem
(as described in the syllabus) occurs at a vertex of the Voronoi diagram.
A pleasing number of candidates were able to approach 2(f) even if they were unable to do
earlier parts of the question, and in these very long questions candidates should be advised
that sometimes later parts are not necessarily harder or impossible to access. Very few who
attempted the matrix power approach could interpret what zeroes meant in the matrices
produced, but a good number successfully turned the matrix into a graph and proceeded
well from there.

(b)
Sketch a Voronoi diagram showing the regions within the metropolitan area that are
closest to each town.
[1]
Markscheme

A1

Note: There is no need for a scale / coordinates here. Condone boundaries extending
beyond the metropolitan area.
[1 mark]

(c.i)
Find the equation of the perpendicular bisector of [IF].
[4]
Markscheme
?xJ=x
the gradient of IF is ?xJ>x = 2 (A1)

negative reciprocal of any gradient (M1)


K
gradient of perpendicular bisector = =

=
Note: Seeing − > (for example) used clearly as a gradient anywhere is evidence of the
“negative reciprocal” method despite being applied to an inappropriate gradient.

?xU>x ?xU=x
midpoint is F =
, =
G = (35, 30) (A1)
K
equation of perpendicular bisector is 𝑦 − 30 = − = (𝑥 − 35) A1

K dO
Note: Accept equivalent forms e.g. 𝑦 = − = 𝑥 + = or 2𝑦 + 𝑥 − 95 = 0.
Allow FT for the final A1 from their midpoint and gradient of perpendicular bisector, as
long as the M1 has been awarded

[4 marks]

(c.iii)
Sketch this new Voronoi diagram showing the regions within the metropolitan area which
are closest to each town.
[2]
Markscheme
M1A1

Note: Award M1 for exactly four perpendicular bisectors around I (IE, IF, IG and IH) seen,
even if not in exactly the right place.
Award A1 for a completely correct diagram. Scale / coordinates are NOT necessary.
Vertices should be in approximately the correct positions but only penalized if clearly
wrong (condone northern and southern vertices appearing to be very close to the
boundary).
Condone the Voronoi diagram extending outside of the square.
Do not award follow-though marks in this part.

[2 marks]
(d)
A car departs from a point due north of Hamilton. It travels due east at constant speed to a
destination point due North of Gaussville. It passes through the Edison, Isaacopolis and
Fermitown districts. The car spends 30% of the travel time in the Isaacopolis district.
Find the distance between Gaussville and the car’s destination point.
[4]
Markscheme
30% of 40 is 12 (A1)
recognizing line intersects bisectors at 𝑦 = 𝑐 (or equivalent) but different 𝑥-values
(M1)
> KO K dO
𝑐 = = 𝑥K + =
and 𝑐 = − = 𝑥= + =

finding an expression for the distance in Isaacopolis in terms of one variable (M1)
2𝑐 − 15 8𝑐
𝑥= − 𝑥K = (95 − 2𝑐 ) − = 100 −
3 3
equating their expression to 12
8𝑐
100 − = 0.3 × 40 = 12
3
𝑐 = 33
distance = 33 (km) A1

[4 marks]

(e.i)
Find the location of the toxic waste dump, given that this location is not on the edge of the
metropolitan area.
[4]
Markscheme
must be a vertex (award if vertex given as a final answer) (R1)
attempt to calculate the distance of at least one town from a vertex (M1)

Note: This must be seen as a calculation or a value.

correct calculation of distances A1


^O
>
OR 21.7 AND √406.25 OR 20.2
=O
F > , 20G A1
Note: Award R1M0A0A0 for a vertex written with no other supporting calculations.
Award R1M0A0A1 for correct vertex with no other supporting calculations.
The final A1 is not dependent on the previous A1. There is no follow-through for the final
A1.
Do not accept an answer based on “uniqueness” in the question.

[4 marks]

(e.ii)
Make one possible criticism of the council’s choice of location.
[1]
Markscheme
For example, any one of the following:
decision does not take into account the different population densities
closer to a city will reduce travel time/help employees
it is closer to some cites than others R1

Note: Accept any correct reason that engages with the scenario.
Do not accept any answer to do with ethical issues about whether toxic waste should ever
be dumped, or dumped in a metropolitan area.
[1 mark]

(f.iii)
A sewer inspector needs to plan the shortest possible route through each of the
connections between different locations. Determine an appropriate start point and an
appropriate end point of the inspection route.
Note that the fact that each location is connected to itself does not correspond to a sewer
that needs to be inspected.
[2]
Markscheme
EITHER
the orders of the different vertices are:
E 2
F 1
G 2
H 2
I 1
T 2 (A1)

Note: Accept a list where each order is 2 greater than listed above.

OR
a correct diagram/graph showing the connections between the locations (A1)

Note: Accept a diagram with loops at each vertex.


This mark should be awarded if candidate is clearly using their correct diagram from the
previous part.

THEN
“Start at F and end at I” OR “Start at I and end at F” A1
Note: Award A1A0 for “it could start at either F or I”.
Award A1A1 for “IGEHTF” OR “FTHEGI”.
Award A1A1 for “F and I” OR “I and F”.

[2 marks]

(f.i)
Find which town is last to be polluted. Justify your answer.
[3]
Markscheme
METHOD 1
attempting 𝐌 > M1
attempting 𝐌 ? M1
e.g.
last row/column of 𝐌 > = (3 5 1 6 0 7)
last row/column of 𝐌 ? = (10 12 4 16 1 18)
hence Isaacopolis is the last city to be polluted A1

Note: Do not award the A1 unless both 𝐌 > and 𝐌 ? are considered.
Award M1M0A0 for a claim that the shortest distance is from 𝑇 to 𝐼 and that it is 4, without
any support.

METHOD 2
attempting to translate 𝐌 to a graph or a list of cities polluted on each day (M1)
correct graph or list A1

hence Isaacopolis is the last city to be polluted A1

Note: Award M1A1A1 for a clear description of the graph in words leading to the correct
answer.

[3 marks]
(f.ii)
Write down the number of days it takes for the pollution to reach the last town.
[1]
Markscheme
it takes 4 days A1

[1 mark]

(c.ii)
Given that the coordinates of one vertex of the new Voronoi diagram are (20, 37.5), find
the coordinates of the other two vertices within the metropolitan area.
[4]
Markscheme
the perpendicular bisector of EH is 𝑦 = 20 (A1)

Note: Award this A1 if seen in the 𝑦-coordinate of any final answer or if 20 is used as the 𝑦-
value in the equation of any other perpendicular bisector.

attempt to use symmetry OR intersecting two perpendicular bisectors (M1)


=O
F > , 20G A1

(20, 2.5) A1

[4 marks]

42.
[Maximum mark: 12]
20N.3.AHL.TZ0.Hdm_2
Christine and her friends live in Winnipeg, Canada. The weighted graph shows the location
of their houses and the time, in minutes, to travel between each house.
Christine’s house is located at vertex C.
(a.i)
Use Dijkstra’s algorithm to find the shortest time to travel from C to F, clearly showing how
the algorithm has been applied.
[6]
Markscheme
attempts to construct a graph or table to represent Dijkstra’s algorithm M1
EITHER
OR

a clear attempt at Step 1 (C, D, H and B considered) M1


Steps 2 and 3 correctly completed A1
Step 4 (A : 44 → 36) correctly completed A1
Steps 5 and 6 (E : 41 → 40 and F : 58 → 57 or 57 → 55 or 58 → 55) correctly completed
A1
shortest time = 55 (mins) A1

[6 marks]
(a.ii)
Hence write down the shortest path from C to F.
[1]
Markscheme
CHGEF A1
Note: Award A1 only if it is clear that Dijkstra’s algorithm has been attempted in part (a)
(i). This A1 can be awarded if the candidate attempts to use Dijkstra’s algorithm but
neglects to state 55 (mins).

[1 mark]

(b)
A new road is constructed that allows Christine to travel from H to A in 𝑡 minutes. If
Christine starts from home and uses this new road her minimum travel time to A is
reduced, but her minimum travel time to F remains the same.
Find the possible values of 𝑡.
[5]
Markscheme
minimum travel time from C to A is reduced
CHA is now 12 + 𝑡 (mins) (M1)
CBA is still 25 + 11 (mins)
so 12 + 𝑡 < 36 (𝑡 < 24) (A1)

Note: Condone 𝑡 ≤ 24.

travel time from C to F remains the same (55 mins)


CHAF is now 12 + 𝑡 + 21 (mins) (M1)
12 + 𝑡 + 21 ≥ 55 (𝑡 ≥ 22) (A1)
so 22 ≤ 𝑡 < 24 A1

Note: Accept 𝑡 = 22, 23.

[5 marks]
43.
[Maximum mark: 11]
20N.3.AHL.TZ0.Hdm_5
𝐺 is a simple, connected, planar graph with 9 vertices and 𝑒 edges.
The complement of 𝐺 has 𝑒′ edges.
(a)
Find the maximum possible value of 𝑒.
[2]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.
substitutes 𝑣 = 9 into either 𝑒 = 3𝑣 − 6 or 𝑒 ≤ 3𝑣 − 6 (M1)
the maximum number of edges is 21 (𝑒 ≤ 21) A1

[2 marks]

(b)
Find an expression for 𝑒′ in terms of 𝑒.
[2]
Markscheme

9
𝜅d has eF G =f 36 edges (A1)
2
9
so 𝑒′ = 36 − 𝑒 F= F G − 𝑒G A1
2

[2 marks]

(c)
Given that the complement of 𝐺 is also planar and connected, find the possible values of 𝑒.
[2]
Markscheme
𝑒′ ≤ 21 ⇒ 36 − 𝑒 ≤ 21 (M1)
15 ≤ 𝑒 ≤ 21 (the possible values are 15, 16, 17, 18, 19, 20 and 21) A1

[2 marks]

(d)
𝐻 is a simple graph with 𝑣 vertices and 𝑒 edges.
Given that both 𝐻 and its complement are planar and connected, find the
maximum possible value of 𝑣.
[5]
Markscheme
g(gJK)
recognises that 𝑒 + 𝑒′ = =
(or equivalent) (A1)

uses 𝑒 ≤ 3𝑣 − 6 and 𝑒′ ≤ 3𝑣 − 6 M1
g(gJK)
to form =
− (3𝑣 − 6) ≤ 3𝑣 − 6 A1

g(gJK)
Note: Award A1 for =
− (3𝑣 − 6) = 3𝑣 − 6.

attempts to solve their quadratic inequality (equality) (M1)


𝑣 = − 13𝑣 + 24 ≤ 0 ⇒ 2.228 … ≤ 𝑣 ≤ 10.77 …
the maximum possible value of 𝑣 is 10 (𝑣 ≤ 10) A1

[5 marks]
44.
[Maximum mark: 10]
19N.3.AHL.TZ0.Hdm_1
A driver needs to make deliveries to five shops 𝐴, 𝐵, 𝐶, 𝐷 and 𝐸. The driver starts and
finishes his journey at the warehouse 𝑊. The driver wants to find the shortest route to visit
all the shops and return to the warehouse. The distances, in kilometres, between the
locations are given in the following table.
(a)
By deleting 𝑊, use the deleted vertex algorithm to find a lower bound for the length of a
route that visits every shop, starting and finishing at 𝑊.
[6]
Markscheme
deleting W and its adjacent edges, the minimal spanning tree is

A1A1A1A1
Note: Award the A1’s for either the edges or their weights.
the minimum spanning tree has weight = 54
Note: Accept a correct drawing of the minimal spanning tree.
adding in the weights of 2 deleted edges of least weight WB and WC (M1)
lower bound = 54 + 36 + 39
= 129 A1
[6 marks]
(b)
Starting from 𝑊, use the nearest-neighbour algorithm to find a route which gives an upper
bound for this problem and calculate its length.
[4]
Markscheme
attempt at the nearest-neighbour algorithm M1
WB
BA
AD
DE
EC
CW A1
Note: Award M1 for a route that begins with WB and then BA.
upper bound = 36 + 11 + 15 + 12 + 22 + 39 = 135 (M1)A1
[4 marks]

45.
[Maximum mark: 14]
19N.3.AHL.TZ0.Hdm_4
𝐺 is a simple, connected graph with eight vertices.
𝐻 is a connected, planar graph, with 𝑣 vertices, 𝑒 edges and 𝑓 faces. Every face in 𝐻 is
bounded by exactly 𝑘 edges.
(a.i)
Write down the minimum number of edges in 𝐺.
[1]
Markscheme
7 (a tree) A1
[1 mark]

(a.ii)
Find the maximum number of edges in 𝐺.
[2]
Markscheme
•×‚
(7 + 6 + 5 + 4 + 3 + 2 + 1) (a complete graph) (M1)
=

= 28 A1
[2 marks]

(a.iii)
Find the maximum number of edges in 𝐺, given that 𝐺 contains an Eulerian circuit.
[2]
Markscheme
•×^
=
(since every vertex must be of degree 6) (M1)

= 24 A1
[2 marks]

(b.i)
Explain why 2𝑒 = 𝑘𝑓.
[2]
Markscheme
counting the edges around every face gives 𝑘𝑓 edges A1
but as every edge is counted in 2 faces R1
⇒ 𝑘𝑓 = 2𝑒 AG
[2 marks]

(b.iii)
Find the possible values of 𝑓 when 𝑣 = 13.
[4]
Markscheme
2𝑣 − 𝑘𝑓 + 2𝑓 = 4 (or equivalent) M1
when 𝑣 = 13
(𝑘 − 2)𝑓 = 22 or (2 − 𝑘)𝑓 = −22 A1
EITHER
(𝑘 − 2)𝑓 = 1 × 2 × 11 M1
OR
==
substituting at least two of 𝑘 = 13, 4, 3 into 𝑓 = ƒJ= (or equivalent) M1

THEN
𝑓 = 2, 11, 22 (since 𝑓 > 1) A1
[4 marks]
(b.ii)
Find the value of 𝑓 when 𝑣 = 9 and 𝑘 = 3.
[3]
Markscheme
using 𝑣 − 𝑒 + 𝑓 = 2 with 𝑣 = 9 M1
EITHER
substituting 2𝑒 = 3𝑓 into 2(9) − 2𝑒 + 2𝑓 = 4 (M1)
OR
>„
substituting 𝑒 = into 9 − 𝑒 + 𝑓 = 2 (M1)
=

THEN
18 − 𝑓 = 4
𝑓 = 14 A1
[3 marks]
46.
[Maximum mark: 17]
18N.3.AHL.TZ0.Hdm_4
Consider the graph G represented in the following diagram.
The graph G is a plan of a holiday resort where each vertex represents a villa and the edges
represent the roads between villas. The weights of the edges are the times, in minutes, Mr
José, the security guard, takes to walk along each of the roads. Mr José is based at villa A.
(a)
State, with a reason, whether or not G has an Eulerian circuit.
[1]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.
no because the graph has vertices (A, B, D, F) of odd degree R1

[1 mark]
(b)
Use Kruskal’s algorithm to find a minimum spanning tree for G, stating its total weight.
Indicate clearly the order in which the edges are added.
[4]
Markscheme
the edges are added in the order
BI 5
DH 5 A1
AB 6
AF 6
CI 6 A1
CD 7
EF 7 A1
total weight = 42 A1
Note: The orders of the edges with the same weight are interchangeable.
Accept indication of correct edge order on a diagram.

[4 marks]
(c)
Use a suitable algorithm to show that the minimum time in which Mr José can get from A to
E is 13 minutes.
[5]
Markscheme
clear indication of using Dijkstra for example M1

[5 marks]
(d)
Find the minimum time it takes Mr José to patrol the resort if he has to walk along every
road at least once, starting and ending at A. State clearly which roads need to be repeated.
[7]
Markscheme
there are 4 vertices of odd degree (A, F, B and D) (A1)
attempting to list at least 2 possible pairings of odd vertices M1
A → F and B → D has minimum weight 6 + 17 = 23
A → B and F → D has minimum weight 6 + 18 = 24
A → D and F → B has minimum weight 20 + 12 = 32 A1A1
Note: Award A1A0 for 2 pairs.
minimum time is (116 + 23 =) 139 (mins) (M1)A1
roads repeated are AF, BC and CD A1

[7 marks]

47.
[Maximum mark: 8]
18M.3.AHL.TZ0.Hdm_1
Consider the following weighted graph G.
(a.i)
State what feature of G ensures that G has an Eulerian trail.
[1]
Markscheme
G has an Eulerian trail because it has (exactly) two vertices (B and F) of odd degree R1
[1 mark]

(a.ii)
State what feature of G ensures that G does not have an Eulerian circuit.
[1]
Markscheme
G does not have an Eulerian circuit because not all vertices are of even degree R1
[1 mark]

(b)
Write down an Eulerian trail in G.
[2]
Markscheme
for example BAEBCEFCDF A1A1
Note: Award A1 for start/finish at B/F, A1 for the middle vertices.
[2 marks]

(c.ii)
Starting and finishing at B, find a solution to the Chinese postman problem for G.
[3]
Markscheme
we require the Eulerian trail in (b), (weight = 65) (M1)
and the minimum walk FEB (15) A1
for example BAEBCEFCDFEB A1
Note: Accept EB added to the end or FE added to the start of their answer in (b) in
particular for follow through.
[3 marks]
(c.iii)
Calculate the total weight of the solution.
[1]
Markscheme
total weight is (65 + 15=)80 A1
[1 mark]

48.
[Maximum mark: 11]
17N.3.AHL.TZ0.Hdm_1
Mathilde delivers books to five libraries, A, B, C, D and E. She starts her deliveries at library
D and travels to each of the other libraries once, before returning to library D. Mathilde
wishes to keep her travelling distance to a minimum.
The weighted graph 𝐻, representing the distances, measured in kilometres, between the
five libraries, has the following table.
(a)
Draw the weighted graph 𝐻.
[2]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.

complete graph on 5 vertices A1


weights correctly marked on graph A1
[2 marks]
(b)
Starting at library D use the nearest-neighbour algorithm, to find an upper bound for
Mathilde’s minimum travelling distance. Indicate clearly the order in which the edges are
selected.
[5]
Markscheme
clear indication that the nearest-neighbour algorithm has been applied M1
DA (or 16) A1
AB (or 18) then BC (or 15) A1
CE (or 17) then ED (or 19) A1
UB = 85 A1
[5 marks]

(c)
By first removing library C, use the deleted vertex algorithm, to find a lower bound for
Mathilde’s minimum travelling distance.
[4]
Markscheme
an attempt to find the minimum spanning tree (M1)
DA (16) then BE (17) then AB (18) (total 51) A1
reconnect C with the two edges of least weight, namely CB (15) and CE (17) M1
LB = 83 A1
[4 marks]
49.
[Maximum mark: 12]
17M.3.AHL.TZ0.Hdm_2
The weights of the edges in the complete graph 𝐺 are given in the following table.
(a)
Starting at A , use the nearest neighbour algorithm to find an upper bound for the travelling
salesman problem for 𝐺.
[5]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.
the edges are traversed in the following order
AB A1
BC
CF A1
FE
ED A1
DA A1
upper bound = weight of this cycle = 4 + 1 + 2 + 7 + 11 + 8 = 33 A1
[5 marks]
(b)
By first deleting vertex A , use the deleted vertex algorithm together with Kruskal’s
algorithm to find a lower bound for the travelling salesman problem for 𝐺.
[7]
Markscheme
having deleted A, the order in which the edges are added is
BC A1
CF A1
CD A1
EF A1

Note: Accept indication of the correct order on a diagram.

to find the lower bound, we now reconnect A using the two edges with the lowest weights,
that is AB and AF (M1)(A1)
lower bound = 1 + 2 + 5 + 7 + 4 + 6 = 25 A1

Note: Award (M1)(A1)A1 for LB = 15 + 4 + 6 = 25 obtained either from an incorrect


order of correct edges or where order is not indicated.

[7 marks]
50.
[Maximum mark: 9]
17M.3.AHL.TZ0.Hdm_3
(a.i)
In the context of graph theory, explain briefly what is meant by a circuit;
[1]
Markscheme
a circuit is a walk that begins and ends at the same vertex and has no repeated edges A1
[1 mark]

(a.ii)
In the context of graph theory, explain briefly what is meant by an Eulerian circuit.
[1]
Markscheme
an Eulerian circuit is a circuit that contains every edge of a graph A1
[1 mark]

(b)
The graph 𝐺 has six vertices and an Eulerian circuit. Determine whether or not its
complement 𝐺 … can have an Eulerian circuit.
[3]
Markscheme
if 𝐺 has an Eulerian circuit all vertices are even (are of degree 2 or 4) A1
hence, 𝐺 … must have all vertices odd (of degree 1 or 3) R1
hence, 𝐺 … cannot have an Eulerian circuit R1

Note: Award A1 to candidates who begin by considering a specific 𝐺 and 𝐺 … (diagram).


Award R1R1 to candidates who then consider a general 𝐺 and 𝐺 … .
[3 marks]

(c)
Find an example of a graph 𝐻, with five vertices, such that 𝐻 and its complement 𝐻… both
have an Eulerian trail but neither has an Eulerian circuit. Draw 𝐻 and 𝐻… as your solution.
[4]
Markscheme
for example
A2
A2

Notes: Each graph must have 3 vertices of order 2 and 2 odd vertices. Award A2 if one of
the graphs satisfies that and the final A2 if the other graph is its complement.

[4 marks]
51.
[Maximum mark: 19]
16N.3.AHL.TZ0.Hdm_4
The simple, complete graph 𝜅† (𝑛 > 2) has vertices AK , A= , A> , … , A† . The weight of the
edge from Aˆ to A‰ is given by the number 𝑖 + 𝑗.

Consider the general graph 𝜅† .


(a)
(i) Draw the graph 𝜅? including the weights of all the edges.
(ii) Use the nearest-neighbour algorithm, starting at vertex AK , to find a Hamiltonian
cycle.
(iii) Hence, find an upper bound to the travelling salesman problem for this weighted
graph.
[4]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.

(i) A1A1

Note: A1 for the graph, A1 for the weights.

(ii) cycle is AK A= A> A? AK A1


(iii) upper bound is 3 + 5 + 7 + 5 = 20 A1
[4 marks]
(b)
Consider the graph 𝜅O . Use the deleted vertex algorithm, with AO as the deleted vertex, to
find a lower bound to the travelling salesman problem for this weighted graph.
[5]
Markscheme
with AO deleted, (applying Kruskal’s Algorithm) the minimum spanning tree will consist of
the edges AK A= , AK A> , AK A? , of weights 3, 4, 5 (M1)A1
the two edges of smallest weight from AO are AO AK and AO A= of weights 6 and 7 (M1)A1
so lower bound is 3 + 4 + 5 + 6 + 7 = 25 A1
[5 marks]

(c)
(i) Use the nearest-neighbour algorithm, starting at vertex AK , to find a Hamiltonian cycle.
(ii) Hence find and simplify an expression in 𝑛, for an upper bound to the travelling
salesman problem for this weighted graph.
[7]
Markscheme
(i) starting at AK we go A= , A> … A†
we now have to take A† AK
thus the cycle is AK A= A> … A†JK A† AK A1A1

Note: Final A1 is for A† AK .


(ii) smallest edge from AK is AK A= of weight 3, smallest edge from A= (to a new vertex) is
A= A> of weight 5, smallest edge from A†JK (to a new vertex) is A†JK A† of weight 2𝑛 − 1
(M1)
weight of A† AK is 𝑛 + 1
weight is 3 + 5 + 7 + ⋯ + (2𝑛 − 1) + (𝑛 + 1) A1
(†JK)
= =
(2𝑛 + 2) + (𝑛 + 1) M1A1
= 𝑛(𝑛 + 1) (which is an upper bound) A1

Note: Follow through is not applicable.

[7 marks]

(d)
By splitting the weight of the edge Aˆ A‰ into two parts or otherwise, show that all
Hamiltonian cycles of 𝜅† have the same total weight, equal to the answer found in (c)(ii).
[3]
Markscheme
put a marker on each edge Aˆ A‰ so that 𝑖 of the weight belongs to vertex Aˆ and 𝑗 of the
weight belongs to vertex A‰ M1
the Hamiltonian cycle visits each vertex once and only once and for vertex Aˆ there will be
weight 𝑖 (belonging to vertex Aˆ ) both going in and coming out R1

so the total weight will be ∑†ˆ•K 2𝑖 = 2 = (𝑛 + 1) = 𝑛(𝑛 + 1) A1AG

Note: Accept other methods for example induction.

[3 marks]

52.
[Maximum mark: 19]
16N.3.AHL.TZ0.Hdm_4
The simple, complete graph 𝜅† (𝑛 > 2) has vertices AK , A= , A> , … , A† . The weight of the
edge from Aˆ to A‰ is given by the number 𝑖 + 𝑗.
Consider the general graph 𝜅† .
(a)
(i) Draw the graph 𝜅? including the weights of all the edges.
(ii) Use the nearest-neighbour algorithm, starting at vertex AK , to find a Hamiltonian
cycle.
(iii) Hence, find an upper bound to the travelling salesman problem for this weighted
graph.
[4]
Markscheme
* This question is from an exam for a previous syllabus, and may contain minor differences
in marking or structure.

(i) A1A1

Note: A1 for the graph, A1 for the weights.

(ii) cycle is AK A= A> A? AK A1


(iii) upper bound is 3 + 5 + 7 + 5 = 20 A1
[4 marks]
(b)
Consider the graph 𝜅O . Use the deleted vertex algorithm, with AO as the deleted vertex, to
find a lower bound to the travelling salesman problem for this weighted graph.
[5]
Markscheme
with AO deleted, (applying Kruskal’s Algorithm) the minimum spanning tree will consist of
the edges AK A= , AK A> , AK A? , of weights 3, 4, 5 (M1)A1
the two edges of smallest weight from AO are AO AK and AO A= of weights 6 and 7 (M1)A1
so lower bound is 3 + 4 + 5 + 6 + 7 = 25 A1
[5 marks]

(c)
(i) Use the nearest-neighbour algorithm, starting at vertex AK , to find a Hamiltonian cycle.
(ii) Hence find and simplify an expression in 𝑛, for an upper bound to the travelling
salesman problem for this weighted graph.
[7]
Markscheme
(i) starting at AK we go A= , A> … A†
we now have to take A† AK
thus the cycle is AK A= A> … A†JK A† AK A1A1

Note: Final A1 is for A† AK .


(ii) smallest edge from AK is AK A= of weight 3, smallest edge from A= (to a new vertex) is
A= A> of weight 5, smallest edge from A†JK (to a new vertex) is A†JK A† of weight 2𝑛 − 1
(M1)
weight of A† AK is 𝑛 + 1
weight is 3 + 5 + 7 + ⋯ + (2𝑛 − 1) + (𝑛 + 1) A1
(†JK)
= =
(2𝑛 + 2) + (𝑛 + 1) M1A1
= 𝑛(𝑛 + 1) (which is an upper bound) A1

Note: Follow through is not applicable.

[7 marks]

(d)
By splitting the weight of the edge Aˆ A‰ into two parts or otherwise, show that all
Hamiltonian cycles of 𝜅† have the same total weight, equal to the answer found in (c)(ii).
[3]
Markscheme
put a marker on each edge Aˆ A‰ so that 𝑖 of the weight belongs to vertex Aˆ and 𝑗 of the
weight belongs to vertex A‰ M1
the Hamiltonian cycle visits each vertex once and only once and for vertex Aˆ there will be
weight 𝑖 (belonging to vertex Aˆ ) both going in and coming out R1

so the total weight will be ∑†ˆ•K 2𝑖 = 2 = (𝑛 + 1) = 𝑛(𝑛 + 1) A1AG

Note: Accept other methods for example induction.

[3 marks]

53.
[Maximum mark: 6]
SPM.1.SL.TZ0.2
The Osaka Tigers basketball team play in a multilevel stadium.
The most expensive tickets are in the first row. The ticket price, in Yen (¥), for each row
forms an arithmetic sequence. Prices for the first three rows are shown in the following
table.

(a)
Write down the value of the common difference, 𝑑
[1]
Markscheme
(𝑑 =) − 250 A1
[1 mark]
(b)
Calculate the price of a ticket in the 16th row.
[2]
Markscheme
(𝑢K^ =)6800 + (16 − 1)(−250) M1
(¥)3050 A1
[2 marks]

(c)
Find the total cost of buying 2 tickets in each of the first 16 rows.
[3]
Markscheme
K^
(𝑆K^ =) F G •2 × 6800 + (16 − 1)(− 250)‘ × 2 M1M1
=

Note: Award M1 for correct substitution into arithmetic series formula.


Award M1 for multiplication by 2 seen.
OR
K^
(𝑆K^ =) F G (6800 + 3050) × 2 M1M1
=

Note: Award M1 for correct substitution into arithmetic series formula.


Award M1 for multiplication by 2 seen.
(¥)158 000 (157 600) A1
[3 marks]

© International Baccalaureate Organization, 2023

You might also like