OCR MEI D1 2015 June — Question 4 16 marks

Exam BoardOCR MEI
ModuleD1 (Decision Mathematics 1)
Year2015
SessionJune
Marks16
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicShortest Path
TypeDijkstra combined with MST
DifficultyStandard +0.3 This is a standard D1 question testing routine application of Dijkstra's algorithm and Prim's algorithm with small networks (6 nodes). Part (b)(iii) requires explaining why the reverse-delete algorithm works, which needs some insight but is accessible. Part (b)(iv) involves simple algebraic manipulation of n(n-1)/2 - (n-1). Overall, this is slightly easier than average as it's mostly algorithmic execution with one conceptual part that's well within D1 scope.
Spec7.04a Shortest path: Dijkstra's algorithm7.04b Minimum spanning tree: Prim's and Kruskal's algorithms

4 The table defines a network on 6 nodes, the numbers representing distances between those nodes.
ABCDEF
A32783
B345
C246
D75
E862
F32
  1. Use Dijkstra's algorithm to find the shortest routes from A to each of the other vertices. Give those routes and their lengths.
  2. Jack wants to find a minimum spanning tree for the network.
    1. Apply Prim's algorithm to the network, draw the minimum spanning tree and give its length. Jill suggests the following algorithm is easier.
      Step 1 Remove an arc of longest length which does not disconnect the network
      Step 2 If there is an arc which can be removed without disconnecting the network then go to Step 1
      Step 3 Stop
    2. Show the order in which arcs are removed when Jill's algorithm is applied to the network.
    3. Explain why Jill's algorithm always produces a minimum spanning tree for a connected network.
    4. In a complete network on \(n\) vertices there are \(\frac { n ( n - 1 ) } { 2 }\) arcs. There are \(n - 1\) arcs to include when using Prim's algorithm. How many arcs are there to remove using Jill's algorithm? For what values of \(n\) does Jill have more arcs to remove than Prim has to include?

Question 4:
Part (a)
AnswerMarks Guidance
AnswerMarks Guidance
Dijkstra's algorithm applied correctly at EB1 Dijkstra — award only if correct at E
Other working values correctB1 other working values
Order of labelling correctB1 order of labelling
Labels correctB1 labels
Routes: AB 3, AC 2, AD 7, AFE 5, AF 3B1 routes
Lengths correctB1 lengths
[6]
Part (b)(i)
AnswerMarks Guidance
AnswerMarks Guidance
Tree or attempt at Prim's algorithmM1 tree or attempt at Prim
Correct minimum spanning tree (edges AB=3, AC=2, BC=5, FE=2, AF=3) with Length \(= 15\)A1
Length \(= 15\)B1
[3]
Part (b)(ii)
AnswerMarks Guidance
AnswerMarks Guidance
Removes AE, AD, CE then BCM1 AE, AD, CE (in order)
BC onlyA1 BC only
[2]
Part (b)(iii)
AnswerMarks Guidance
AnswerMarks Guidance
It will remain connected.B1
There will be no cycles left.B1
Removing a largest possible arc at each stage guarantees a minimum spanning tree.B1
[3]
Part (b)(iv)
AnswerMarks Guidance
AnswerMarks Guidance
\(\frac{n^2-3n+2}{2}\) (or equivalent) arcs for Jill to remove.B1 algebraic simplification not needed
More than Prim if \(n\) is 5 or moreB1
[2]
# Question 4:

## Part (a)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Dijkstra's algorithm applied correctly at E | B1 | Dijkstra — award only if correct at E |
| Other working values correct | B1 | other working values |
| Order of labelling correct | B1 | order of labelling |
| Labels correct | B1 | labels |
| Routes: AB 3, AC 2, AD 7, AFE 5, AF 3 | B1 | routes |
| Lengths correct | B1 | lengths |
| **[6]** | | |

## Part (b)(i)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Tree or attempt at Prim's algorithm | M1 | tree or attempt at Prim |
| Correct minimum spanning tree (edges AB=3, AC=2, BC=5, FE=2, AF=3) with Length $= 15$ | A1 | |
| Length $= 15$ | B1 | |
| **[3]** | | |

## Part (b)(ii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Removes AE, AD, CE then BC | M1 | AE, AD, CE (in order) |
| BC only | A1 | BC only |
| **[2]** | | |

## Part (b)(iii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| It will remain connected. | B1 | |
| There will be no cycles left. | B1 | |
| Removing a largest possible arc at each stage guarantees a minimum spanning tree. | B1 | |
| **[3]** | | |

## Part (b)(iv)
| Answer | Marks | Guidance |
|--------|-------|----------|
| $\frac{n^2-3n+2}{2}$ (or equivalent) arcs for Jill to remove. | B1 | algebraic simplification not needed |
| More than Prim if $n$ is 5 or more | B1 | |
| **[2]** | | |
4 The table defines a network on 6 nodes, the numbers representing distances between those nodes.

\begin{center}
\begin{tabular}{|l|l|l|l|l|l|l|}
\hline
 & A & B & C & D & E & F \\
\hline
A &  & 3 & 2 & 7 & 8 & 3 \\
\hline
B & 3 &  & 4 & 5 &  &  \\
\hline
C & 2 & 4 &  &  & 6 &  \\
\hline
D & 7 & 5 &  &  &  &  \\
\hline
E & 8 &  & 6 &  &  & 2 \\
\hline
F & 3 &  &  &  & 2 &  \\
\hline
\end{tabular}
\end{center}
\begin{enumerate}[label=(\alph*)]
\item Use Dijkstra's algorithm to find the shortest routes from A to each of the other vertices. Give those routes and their lengths.
\item Jack wants to find a minimum spanning tree for the network.
\begin{enumerate}[label=(\roman*)]
\item Apply Prim's algorithm to the network, draw the minimum spanning tree and give its length.

Jill suggests the following algorithm is easier.\\
Step 1 Remove an arc of longest length which does not disconnect the network\\
Step 2 If there is an arc which can be removed without disconnecting the network then go to Step 1\\
Step 3 Stop
\item Show the order in which arcs are removed when Jill's algorithm is applied to the network.
\item Explain why Jill's algorithm always produces a minimum spanning tree for a connected network.
\item In a complete network on $n$ vertices there are $\frac { n ( n - 1 ) } { 2 }$ arcs. There are $n - 1$ arcs to include when using Prim's algorithm. How many arcs are there to remove using Jill's algorithm?

For what values of $n$ does Jill have more arcs to remove than Prim has to include?
\end{enumerate}\end{enumerate}

\hfill \mbox{\textit{OCR MEI D1 2015 Q4 [16]}}