IB Mathematics AHL 3.15: Adjacency matrices AI HL Paper 1- Exam Style Questions- New Syllabus
Question
A directed graph, \(G\), has an adjacency matrix, \(M\), where \(M=\begin{pmatrix}0&1&1&0&0\\1&0&1&1&0\\1&0&0&1&1\\0&1&1&0&0\\0&0&0&1&0\end{pmatrix}\). The row and column order is \(A,B,C,D,E\).
(a) Write down one directed edge in \(G\). \([1]\)
It is given that \(M^2=\begin{pmatrix}2&0&1&2&1\\1&2&2&1&1\\0&2&2&1&0\\2&0&1&2&1\\0&1&1&0&0\end{pmatrix}\) and \(M^3=\begin{pmatrix}1&4&4&2&1\\4&2&4&5&2\\4&1&3&4&2\\1&4&4&2&1\\2&0&1&2&1\end{pmatrix}\), with the same row and column order.
(b) State, with justification, whether it is possible to move from any vertex to any other vertex in
(i) exactly three transitions.
(ii) at most three transitions. \([4]\)
Total: \([5\text{ marks}]\)
▶️ Answer/Explanation
(a) One directed edge is \(\boxed{C\to E}\), because the entry in row \(C\), column \(E\) of \(M\) is \(1\). [A1]
Part (a): \(1\) mark.
(b)(i) \(\boxed{\text{No}}\). [A1]
The entry in row \(E\), column \(B\) of \(M^3\) is \(0\), so no walk from \(E\) to \(B\) has exactly \(3\) transitions. [R1]
(b)(ii) \(\boxed{\text{Yes}}\). [A1]
Every entry of \(M^2+M^3\) is positive, so every pair is connected by a walk of length \(2\) or \(3\). In particular, \(E\to D\to B\) uses \(2\) transitions. [R1]
Part (b): \(4\) marks.
Total: \(5\) marks.
AHL \(3.14\) — Directed graphs: (a).
AHL \(3.15\) — Adjacency matrices and numbers of walks: (b).
Question
The graph \(G\) has six vertices and is shown in the diagram.
(a) State, giving a reason, whether \(G\) is
(i) simple;
(ii) connected. [2]
(b) Complete the adjacency matrix for \(G\). [2]
| \(A\) | \(B\) | \(C\) | \(D\) | \(E\) | \(F\) | |
|---|---|---|---|---|---|---|
| \(A\) | \(0\) | \(0\) | \(1\) | \(0\) | \(0\) | |
| \(B\) | \(0\) | \(1\) | \(0\) | \(0\) | ||
| \(C\) | \(0\) | \(0\) | \(0\) | \(0\) | \(0\) | |
| \(D\) | \(1\) | \(1\) | \(0\) | \(0\) | \(0\) | \(0\) |
| \(E\) | \(0\) | \(0\) | \(0\) | \(0\) | \(0\) | \(1\) |
| \(F\) | \(0\) | \(0\) | \(0\) | \(0\) | \(1\) | \(0\) |
(c) Hence, determine the number of walks from \(A\) to \(B\) with fewer than four edges. [4]
Most-appropriate topic codes (IB DP Mathematics: Applications and Interpretation HL):
▶️ Answer/Explanation
(a)(i)
No, \(G\) is not a simple graph because there are two different edges joining vertices \(A\) and \(B\). A simple graph cannot contain multiple edges between the same pair of vertices.
✅ Answer: No, because there is more than one edge between \(A\) and \(B\).
(a)(ii)
No, \(G\) is not connected. The vertices \(E\) and \(F\) form a separate component from the vertices \(A\), \(B\), \(C\) and \(D\).
For example, there is no path from \(A\) to \(F\).
✅ Answer: No, because not every pair of vertices is joined by a path.
(b)
The entry in row \(i\), column \(j\) records the number of edges joining vertices \(i\) and \(j\).
There are two edges between \(A\) and \(B\), one edge between \(B\) and \(C\), one edge between \(A\) and \(D\), one edge between \(B\) and \(D\), and one edge between \(E\) and \(F\).
| \(A\) | \(B\) | \(C\) | \(D\) | \(E\) | \(F\) | |
|---|---|---|---|---|---|---|
| \(A\) | \(0\) | \(2\) | \(0\) | \(1\) | \(0\) | \(0\) |
| \(B\) | \(2\) | \(0\) | \(1\) | \(1\) | \(0\) | \(0\) |
| \(C\) | \(0\) | \(1\) | \(0\) | \(0\) | \(0\) | \(0\) |
| \(D\) | \(1\) | \(1\) | \(0\) | \(0\) | \(0\) | \(0\) |
| \(E\) | \(0\) | \(0\) | \(0\) | \(0\) | \(0\) | \(1\) |
| \(F\) | \(0\) | \(0\) | \(0\) | \(0\) | \(1\) | \(0\) |
✅ Answer: The missing entries are \(2\), \(2\), \(1\) and \(1\).
(c)
Let \(M\) be the adjacency matrix of \(G\).
The \((A,B)\) entry of \(M^k\) gives the number of walks of length \(k\) from \(A\) to \(B\).
Since the walks must have fewer than four edges, we count walks of lengths \(1\), \(2\) and \(3\).
For walks of length \(1\):
\(M_{AB}=2\).
For walks of length \(2\):
\((M^2)_{AB}=1\).
For walks of length \(3\):
\((M^3)_{AB}=14\).
Therefore, the required number is
\((M+M^2+M^3)_{AB}=2+1+14\)
\(=17\).
✅ Answer: \(17\) walks
