OCR MEI D2 2007 June — Question 3 20 marks

Exam BoardOCR MEI
ModuleD2 (Decision Mathematics 2)
Year2007
SessionJune
Marks20
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicShortest Path
TypeFloyd's algorithm application
DifficultyEasy -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.
Spec7.04a Shortest path: Dijkstra's algorithm

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:
\cline { 2 - 5 } \multicolumn{1}{c|}{}\(\mathbf { 1 }\)\(\mathbf { 2 }\)\(\mathbf { 3 }\)\(\mathbf { 4 }\)
\(\mathbf { 1 }\)63105
\(\mathbf { 2 }\)3672
\(\mathbf { 3 }\)107141

Question 3:
Part (i)
AnswerMarks Guidance
AnswerMarks Guidance
Fourth iteration updates using vertex 4 as intermediateM1
Correct updated distance matrix entriesA3 One mark per correct row/column updated
Correct updated route matrix entriesA3
Part (ii)
AnswerMarks Guidance
AnswerMarks Guidance
Distance from 1 to 3: read off matrix = 10B1
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)
AnswerMarks Guidance
AnswerMarks Guidance
Complete network drawn with correct shortest distances between all pairsB1
Part (iv)
AnswerMarks Guidance
AnswerMarks Guidance
Nearest neighbour from 1: correct sequence identifiedM1
Hamilton cycle and length statedA1
Corresponding route through original networkA1
Part (v)
AnswerMarks Guidance
AnswerMarks Guidance
Remove vertex 2 and find minimum spanning tree of remainderM1
Add two smallest arcs incident to vertex 2M1
Correct lower bound calculatedA1
Part (vi)
AnswerMarks Guidance
AnswerMarks Guidance
If upper bound = lower bound, optimal solution found; otherwise bounds give rangeB1
Comment on whether solution is optimalB1
# 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]}}