Skip to main content
HL AI Paper 3 · Practice

HL AI Paper 3 Practice

Two extended, real-world modelling questions in the style of the 2026 Paper 3 exam. Voronoi diagrams, graph theory, matrices — all linked together. Attempt each part first, then click Reveal worked solution.

Total: 55 marks · Recommended time: 60 minutes · Calculator permitted

Question 1 · Planning a coffee-shop network

Topics: Voronoi, perpendicular bisectors, graph theory, MST · 28 marks

A coffee-chain owner has three existing shops in a city at:

    $A = (4, 2), \quad B = (10, 4), \quad C = (8, 10)$ (units = km).

She wants to open a fourth shop and to plan a delivery network between all four locations. Travel times (min) along direct roads are given later in the question.

(a) [3 marks]

Find the equation of the perpendicular bisector of $[AB]$ in the form $ax + by + c = 0$.

Reveal worked solution

Midpoint of $AB$: $M = (7, 3)$. (M1)

Gradient of $AB$: $m_{AB} = \tfrac{4-2}{10-4} = \tfrac13$; perpendicular gradient $= -3$. (M1)

$y - 3 = -3(x - 7) \Rightarrow 3x + y - 24 = 0.$ (A1)

(b) [3 marks]

Find the equation of the perpendicular bisector of $[BC]$.

Reveal worked solution

Midpoint of $BC$: $(9, 7)$. Gradient of $BC$: $\tfrac{10-4}{8-10} = -3$; perpendicular gradient $= \tfrac13$. (M1 · M1)

$y - 7 = \tfrac13(x - 9) \Rightarrow x - 3y + 12 = 0.$ (A1)

(c) [3 marks]

Hence find the point $P$ equidistant from $A$, $B$ and $C$, and calculate its distance from $A$.

Reveal worked solution

Solve simultaneously: $y = -3x + 24$ and $x - 3y + 12 = 0$.

$x - 3(-3x + 24) + 12 = 0 \Rightarrow 10x - 60 = 0 \Rightarrow x = 6, \; y = 6.$ (M1 · A1)
$|PA| = \sqrt{2^2 + 4^2} = \sqrt{20} \approx 4.47\text{ km}.$ (A1)

(d) [3 marks]

Explain in Voronoi terms what point $P$ represents, and where the owner should place a fourth shop $D$ if she wants to maximise the size of shop $A$'s Voronoi cell.

Reveal worked solution

Interpretation. $P$ is the Voronoi vertex where the cells of $A$, $B$, $C$ meet — the point equidistant from all three shops. (R1)

Placement of $D$. To maximise $A$'s cell, place $D$ as far from $A$ as possible and far from where the customer base concentrates. Practically: place $D$ on the far side of $B$ or $C$ (e.g. north-east of $C$), so its Voronoi cell steals area from $B$ and $C$ rather than from $A$. (R1 · A1)

(e) [5 marks]

The owner places the fourth shop at $D = (10, 10)$. Travel times (min) between the four shops are: $AB = 12, AC = 20, BC = 15, AD = 22, BD = 10, CD = 8$. Use Prim's algorithm starting at vertex $A$ to find the minimum spanning tree (MST). State the edges chosen in order and the total weight.

Reveal worked solution

Step 1. From $A$, cheapest edge: $AB = 12$. Add $B$. (M1)

Step 2. From $\{A, B\}$: edges to $C$ ($AC=20, BC=15$) and $D$ ($AD=22, BD=10$). Cheapest: $BD = 10$. Add $D$.

Step 3. From $\{A, B, D\}$: edges to $C$ ($AC=20, BC=15, CD=8$). Cheapest: $CD = 8$. Add $C$. (A1 · A1)

MST edges (in order): $AB, BD, DC$. Total weight = $12 + 10 + 8 = \mathbf{30}$ min. (A1 · A1)

(f) [5 marks]

The owner now wants a daily circuit: start at $A$, visit every shop exactly once, return to $A$. Use the nearest-neighbour algorithm starting at $A$ to find an upper bound for the shortest circuit.

Reveal worked solution

Nearest-neighbour trace.

  • $A \to$ nearest unvisited $= B$ (12). Path: $A,B$. (M1)
  • $B \to$ nearest unvisited $= D$ (10). Path: $A,B,D$.
  • $D \to$ nearest unvisited $= C$ (8). Path: $A,B,D,C$.
  • Return to $A$: $C \to A = 20$.
Total: $12 + 10 + 8 + 20 = \mathbf{50}$ min. Upper bound $= 50$ min. (A1 · A1 · A1 · A1)

(g) [6 marks]

Now use the deleted-vertex algorithm (deleting $A$) to find a lower bound for the shortest Hamiltonian cycle. Compare with (f) and comment on whether the nearest-neighbour tour is optimal.

Reveal worked solution

Step 1. Remove $A$. Remaining vertices: $\{B, C, D\}$ with edges $BC=15, BD=10, CD=8$.

Step 2. MST of the remaining graph (Prim from $B$): $BD = 10$, then $DC = 8$. MST weight $= 18$. (M1 · A1)

Step 3. Add the two shortest edges from $A$: $AB = 12$ and $AC = 20$ (skipping $AD=22$). (M1 · A1)

Lower bound $= 18 + 12 + 20 = \mathbf{50}$ min. (A1)

Comment. Upper bound = lower bound = 50, so the nearest-neighbour tour $A \to B \to D \to C \to A$ is optimal. (R1)

Question 2 · Modelling a rumour spreading through a school

Topics: differential equations, logistic model, regression, R² · 27 marks

A rumour spreads through a school of $N = 800$ students. Let $x(t)$ be the number who know the rumour after $t$ hours. Assume the rate of spread is proportional both to the number who know and the number who don't:

$\dfrac{dx}{dt} = k \, x (N - x), \quad x(0) = 1.$

Below is data recorded during one Wednesday morning.

$t$ (hours)012345
$x$114140540760795

(a) [4 marks]

Solve the differential equation by separation of variables to show that $x(t) = \dfrac{N}{1 + A e^{-kNt}}$ for some constant $A$ you should identify in terms of $N$ and $x(0)$.

Reveal worked solution

Partial fractions. $\dfrac{1}{x(N-x)} = \dfrac{1}{N}\left(\dfrac{1}{x} + \dfrac{1}{N-x}\right).$ (M1)

$\int \dfrac{dx}{x(N-x)} = \dfrac{1}{N} \ln\dfrac{x}{N-x} = kt + C.$

Rearrange. $\dfrac{x}{N-x} = e^{kNt + NC} = B e^{kNt}$ for some $B > 0$. (M1)

$x = \dfrac{N}{1 + \tfrac{1}{B} e^{-kNt}} = \dfrac{N}{1 + A e^{-kNt}}, \; \text{with } A = \dfrac{N - x(0)}{x(0)}.$

With $x(0) = 1$, $A = N - 1 = 799$. (A1 · AG1)

(b) [4 marks]

Use the data point $(t, x) = (3, 540)$ to estimate $k$ to 3 significant figures.

Reveal worked solution
$540 = \dfrac{800}{1 + 799 e^{-2400 k}} \Rightarrow 1 + 799 e^{-2400 k} = \dfrac{800}{540} = 1.\overline{481}$
$799 e^{-2400 k} = 0.481 \Rightarrow e^{-2400 k} = 6.023 \times 10^{-4}.$ (M1 · A1)
$-2400 k = \ln(6.023 \times 10^{-4}) = -7.416 \Rightarrow k \approx 3.09 \times 10^{-3}.$ (M1 · A1)

(c) [3 marks]

Using the model with your $k$, predict $x(4)$ and compare with the observed value $760$.

Reveal worked solution
$x(4) = \dfrac{800}{1 + 799 \cdot e^{-3.09 \times 10^{-3} \cdot 800 \cdot 4}} = \dfrac{800}{1 + 799 \cdot e^{-9.888}} \approx \dfrac{800}{1 + 0.0410} \approx 768.$ (M1 · A1)

Model predicts $\approx 768$; observed $= 760$. Error $= 8$ (about $1\%$) — very good fit. (A1)

(d) [3 marks]

At what time is the rumour spreading fastest? Interpret this in the context.

Reveal worked solution

Max spread rate. $\dfrac{dx}{dt} = kx(N-x)$ is maximised when $x = N/2 = 400$. (M1)

Solve $400 = \dfrac{800}{1 + 799 e^{-2.472 t}} \Rightarrow e^{-2.472 t} = \dfrac{1}{799} \Rightarrow t \approx 2.7$ hours. (A1)

Interpretation: the rumour spreads fastest around the mid-morning break, when about half the school knows and half don't. (R1)

(e) [5 marks]

A researcher proposes an alternative model: exponential growth $y(t) = e^{ct}$. Using GDC regression on all 6 data points, the researcher obtains $c \approx 1.90$ and $R^2 \approx 0.72$. Compare the two models. Which is better? Justify quantitatively and conceptually.

Reveal worked solution

Quantitative comparison. The logistic model gave a $1\%$ residual at $t=4$ (part c). Computing the logistic prediction at all six data points gives $R^2 \approx 0.9998$. Exponential regression: $R^2 = 0.72$ — much lower. (M1 · A1)

Conceptual reasoning. Exponential growth $e^{ct}$ has no ceiling — it would predict $x(5) \approx e^{9.5} \approx 13{,}400$, hugely overshooting the school population of $800$. (R1)

The logistic model has the carrying-capacity $N = 800$ built in, reflecting the fact that once everyone knows, spread stops. (R1)

Conclusion: the logistic model is superior — higher $R^2$ and physically meaningful bound. (A1)

(f) [4 marks]

Two students, initially resistant, refuse to believe the rumour and never adopt it. Modify the differential equation and describe qualitatively how the long-run behaviour changes.

Reveal worked solution

Modified model. Effective susceptible population $= N - 2 = 798$. New equation:

$\dfrac{dx}{dt} = k \, x \, (798 - x), \quad x(0) = 1.$ (M1)

Long-run behaviour. As $t \to \infty$, $x(t) \to 798$, not $800$. Two students remain permanently uninformed. (M1 · A1)

The shape (S-curve, mid-point at $x = 399$) is essentially unchanged; only the ceiling shifts down by 2. This is why real epidemic / diffusion models often add "immune" or "resistant" compartments. (R1)

(g) [4 marks]

Suggest one further real-world factor not in the model that would change the shape (not just the ceiling) of the curve, and describe how the modified equation would look.

Reveal worked solution

Example factor: forgetting / disproving. Some students who "knew" the rumour lose interest or find out it's false, so $x$ can decrease. Add a linear decay:

$\dfrac{dx}{dt} = k \, x (N - x) - \mu \, x$, where $\mu > 0$ is the forgetting rate. (M1 · A1)

Behaviour: still an S-curve initially, but instead of levelling at $N$, the population settles at a steady state $x^* = N - \dfrac{\mu}{k}$, where new "learners" balance "forgetters". If $\mu \ge kN$, no epidemic ever takes off. This is the classical SIS model from epidemiology. (R1 · A1)

Want unlimited Paper 3 practice targeted at your weakest sub-topics?

Order a Personalised Paper 3 set — €5 for one, delivered as a PDF within 48 hours.