IB Mathematics AHL 3.15: Adjacency matrices AI HL Paper 2- Exam Style Questions- New Syllabus
Question
(i) prove that no single port can reach every other port in the network in a sequence of exactly three voyages.
(ii) determine if it is possible to travel between any two ports in the system using three or fewer voyages. Justify your conclusion.
| Port | A | B | C | D | E |
| A | 0 | 3 | 7 | 8 | 5 |
| B | 3 | 0 | 4 | 9 | 6 |
| C | 7 | 4 | 0 | \(a\) | 10 |
| D | 8 | 9 | \(a\) | 0 | 3 |
| E | 5 | 6 | 10 | 3 | 0 |
Most-appropriate topic codes:
• TOPIC AHL 3.16: Hamiltonian cycles and TSP algorithms — parts (d), (e)
▶️ Answer/Explanation
(a)
Comparing the entries of matrix \(M\):
\(M_{AE} = 1\) but \(M_{EA} = 0\).
\(M_{DE} = 1\) but \(M_{ED} = 0\).
The route between \(A\) and \(E\) (or between \(D\) and \(E\)) can only be travelled in one direction.
(b)
(i) Calculate \(M^3\) to find walks of exactly length 3:
\(M^3 = \begin{pmatrix} 1 & 3 & 1 & 1 & 3 \\ 3 & 1 & 3 & 1 & 4 \\ 0 & 3 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 2 \\ 0 & 4 & 0 & 2 & 1 \end{pmatrix}\)
The matrix contains 0 entries (e.g., \(M^3_{CA}=0\)), confirming some routes are impossible in exactly three trips.
(ii) Check connectivity in 3 trips or fewer using \(M + M^2 + M^3\):
\(M + M^2 + M^3 = \begin{pmatrix} 2 & 5 & 2 & 2 & 5 \\ 4 & 4 & 4 & 2 & 6 \\ 1 & 4 & 1 & 1 & 2 \\ 1 & 1 & 1 & 1 & 3 \\ 1 & 5 & 1 & 3 & 3 \end{pmatrix}\)
All ports can be reached because there are no 0 entries in the non-diagonal positions of the sum matrix.
(c)
To show \(a = 13\), evaluate indirect paths between \(C\) and \(D\):
• Route \(CAD\): \(7 + 8 = 15\)
• Route \(CBD\): \(4 + 9 = 13\)
• Route \(CED\): \(10 + 3 = 13\)
(Route \(CBED\): \(4 + 6 + 3 = 13\) is also accepted).
The least cost is 13 EUR.
(d)
Nearest Neighbour Algorithm from A:
1. Start at \(A\). Nearest unvisited is \(B\) (3). Path: \(A \to B\)
2. From \(B\), nearest unvisited is \(C\) (4). Path: \(A \to B \to C\)
3. From \(C\), nearest unvisited is \(E\) (10). Path: \(A \to B \to C \to E\)
4. From \(E\), only remaining is \(D\) (3). Path: \(A \to B \to C \to E \to D\)
5. Return to start: \(D \to A\) (8).
Total cost = \(3 + 4 + 10 + 3 + 8 = \mathbf{28}\) EUR.
(e)
Deleted Vertex Algorithm (A):
1. Form MST of \(\{B, C, D, E\}\):
– Edge \(ED\) (3)
– Edge \(BC\) (4)
– Edge \(BE\) (6)
Length of spanning tree = \(4 + 6 + 3 = 13\).
2. Reconnect \(A\) using the two cheapest incident edges:
– \(AB\) (3)
– \(AE\) (5)
Lower bound = \(13 + 3 + 5 = \mathbf{21}\) EUR.
