OCR MEI D1 2013 June — Question 2 8 marks

Exam BoardOCR MEI
ModuleD1 (Decision Mathematics 1)
Year2013
SessionJune
Marks8
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeDescribing Sorting Algorithm Steps
DifficultyEasy -1.8 This is a straightforward recall question testing knowledge of sorting algorithm steps. It requires only recognition and description of a standard algorithm (likely bubble or insertion sort) with no problem-solving, calculation, or novel application—significantly easier than typical A-level questions.
Spec7.03j Sorting: bubble sort and shuttle sort

2 The instructions labelled 1 to 7 describe the steps of a sorting algorithm applied to a list of six numbers.
1 Let \(i\) equal 1.
2 Repeat lines 3 to 7, stopping when \(i\) becomes 6 .

Question 2:
Part (i)
AnswerMarks Guidance
AnswerMarks Guidance
\(i=2\) row: 9, 7, 3, 11, 5, 13B1 \(i=2\) row OK
\(i=3\) row: 7, 3, 9, 5, 11, 13B1 \(i=3\) row OK FT
\(i=4\) row: 3, 5, 7, 9, 11, 13 and \(i=5\) row: 3, 5, 7, 9, 11, 13B1 \(i=4\) and 5 rows OK cao
comparisons column correctB1 comparisons
swaps column correctB1 swaps
[5]
Part (ii)
AnswerMarks Guidance
AnswerMarks Guidance
comparisons: 6B1 cao (OK if in 2 parts)
swaps: 3B1 cao (OK if in 2 parts)
[2]
Part (iii)
AnswerMarks Guidance
AnswerMarks Guidance
further swaps: 6B1 cao
[1]
## Question 2:

### Part (i)
| Answer | Marks | Guidance |
|--------|-------|----------|
| $i=2$ row: 9, 7, 3, 11, 5, 13 | B1 | $i=2$ row OK |
| $i=3$ row: 7, 3, 9, 5, 11, 13 | B1 | $i=3$ row OK FT |
| $i=4$ row: 3, 5, 7, 9, 11, 13 and $i=5$ row: 3, 5, 7, 9, 11, 13 | B1 | $i=4$ and 5 rows OK cao |
| comparisons column correct | B1 | comparisons |
| swaps column correct | B1 | swaps |
| | **[5]** | |

### Part (ii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| comparisons: 6 | B1 | cao (OK if in 2 parts) |
| swaps: 3 | B1 | cao (OK if in 2 parts) |
| | **[2]** | |

### Part (iii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| further swaps: 6 | B1 | cao |
| | **[1]** | |

---
2 The instructions labelled 1 to 7 describe the steps of a sorting algorithm applied to a list of six numbers.\\
1 Let $i$ equal 1.\\
2 Repeat lines 3 to 7, stopping when $i$ becomes 6 .\\

\hfill \mbox{\textit{OCR MEI D1 2013 Q2 [8]}}