| Exam Board | OCR MEI |
|---|---|
| Module | D2 (Decision Mathematics 2) |
| Year | 2007 |
| Session | June |
| Marks | 20 |
| Paper | Download PDF ↗ |
| Mark scheme | Download PDF ↗ |
| Topic | Shortest Path |
| Type | Floyd's algorithm application |
| Difficulty | Easy -1.2 This is a straightforward application of Floyd's algorithm requiring students to complete one iteration following a standard procedure. It involves routine matrix updates with given values and no problem-solving insight, making it easier than average A-level questions which typically require multiple techniques or conceptual understanding. |
| Spec | 7.04a Shortest path: Dijkstra's algorithm |
| \cline { 2 - 5 } \multicolumn{1}{c|}{} | \(\mathbf { 1 }\) | \(\mathbf { 2 }\) | \(\mathbf { 3 }\) | \(\mathbf { 4 }\) |
| \(\mathbf { 1 }\) | 6 | 3 | 10 | 5 |
| \(\mathbf { 2 }\) | 3 | 6 | 7 | 2 |
| \(\mathbf { 3 }\) | 10 | 7 | 14 | 1 |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| Fourth iteration updates using vertex 4 as intermediate | M1 | |
| Correct updated distance matrix entries | A3 | One mark per correct row/column updated |
| Correct updated route matrix entries | A3 |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| Distance from 1 to 3: read off matrix = 10 | B1 | |
| Use route matrix: \(R(1,3)=2\), so go via 2; \(R(1,2)=2\), \(R(2,3)=3\) | M1 A1 | |
| Route: \(1 \to 2 \to 3\) (or with intermediate nodes traced) | A1 |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| Complete network drawn with correct shortest distances between all pairs | B1 |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| Nearest neighbour from 1: correct sequence identified | M1 | |
| Hamilton cycle and length stated | A1 | |
| Corresponding route through original network | A1 |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| Remove vertex 2 and find minimum spanning tree of remainder | M1 | |
| Add two smallest arcs incident to vertex 2 | M1 | |
| Correct lower bound calculated | A1 |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| If upper bound = lower bound, optimal solution found; otherwise bounds give range | B1 | |
| Comment on whether solution is optimal | B1 |
# Question 3:
## Part (i)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Fourth iteration updates using vertex 4 as intermediate | M1 | |
| Correct updated distance matrix entries | A3 | One mark per correct row/column updated |
| Correct updated route matrix entries | A3 | |
## Part (ii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Distance from 1 to 3: read off matrix = 10 | B1 | |
| Use route matrix: $R(1,3)=2$, so go via 2; $R(1,2)=2$, $R(2,3)=3$ | M1 A1 | |
| Route: $1 \to 2 \to 3$ (or with intermediate nodes traced) | A1 | |
## Part (iii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Complete network drawn with correct shortest distances between all pairs | B1 | |
## Part (iv)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Nearest neighbour from 1: correct sequence identified | M1 | |
| Hamilton cycle and length stated | A1 | |
| Corresponding route through original network | A1 | |
## Part (v)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Remove vertex 2 and find minimum spanning tree of remainder | M1 | |
| Add two smallest arcs incident to vertex 2 | M1 | |
| Correct lower bound calculated | A1 | |
## Part (vi)
| Answer | Marks | Guidance |
|--------|-------|----------|
| If upper bound = lower bound, optimal solution found; otherwise bounds give range | B1 | |
| Comment on whether solution is optimal | B1 | |
---
3 Floyd's algorithm is applied to the following network:\\
\includegraphics[max width=\textwidth, alt={}, center]{483a681e-011a-464f-b7cb-007d894d1516-3_398_394_331_833}
At the end of the third iteration of the algorithm the distance and route matrices are as follows:
\begin{center}
\begin{tabular}{ | c | c | c | c | c | }
\cline { 2 - 5 }
\multicolumn{1}{c|}{} & $\mathbf { 1 }$ & $\mathbf { 2 }$ & $\mathbf { 3 }$ & $\mathbf { 4 }$ \\
\hline
$\mathbf { 1 }$ & 6 & 3 & 10 & 5 \\
\hline
$\mathbf { 2 }$ & 3 & 6 & 7 & 2 \\
\hline
$\mathbf { 3 }$ & 10 & 7 & 14 & 1 \\
\hline
\end{tabular}
\end{center}
\hfill \mbox{\textit{OCR MEI D2 2007 Q3 [20]}}