AQA D1 2010 January — Question 2 8 marks

Exam BoardAQA
ModuleD1 (Decision Mathematics 1)
Year2010
SessionJanuary
Marks8
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeBubble Sort Execution
DifficultyEasy -1.8 This is a purely mechanical execution of the bubble sort algorithm with explicit step-by-step instructions. It requires only rote application of a memorized procedure with no problem-solving, insight, or mathematical reasoning—significantly easier than typical A-level maths questions which involve calculus, algebra, or proof.
Spec7.03j Sorting: bubble sort and shuttle sort

2
  1. Use a bubble sort to rearrange the following numbers into ascending order. $$\begin{array} { l l l l l l l l } 13 & 16 & 10 & 11 & 4 & 12 & 6 & 7 \end{array}$$
  2. State the number of comparisons and the number of swaps (exchanges) for each of the first three passes.

Question 2:
Part (a)
AnswerMarks Guidance
AnswerMarks Guidance
First pass: 13 16 10 11 4 12 6 7 → 13 10 11 4 12 6 7 16M1 SCA, must have 16 at end of first pass
1st pass fully correctA1
2nd pass fully correctA1
3rd pass fully correctA1
All correct; must have only 2 identical lines at endA1 Ignore any intermediate lines and labelling on lines. Total: 5
Part (b)
AnswerMarks Guidance
AnswerMarks Guidance
Comparisons (C) and Swaps (S) for each pass: 1st: C=7, S=6; 2nd: C=6, S=6; 3rd: C=5, S=3B3;2;1 6 correct; 5 correct; 3 correct – with number of comparisons and swaps being clearly identified for each of the three passes (may be earned in part (a)). Total: 3
# Question 2:

## Part (a)
| Answer | Marks | Guidance |
|--------|-------|----------|
| First pass: 13 16 10 11 4 12 6 7 → 13 10 11 4 12 6 7 **16** | M1 | SCA, must have 16 at end of first pass |
| 1st pass fully correct | A1 | |
| 2nd pass fully correct | A1 | |
| 3rd pass fully correct | A1 | |
| All correct; must have only 2 identical lines at end | A1 | Ignore any intermediate lines and labelling on lines. Total: 5 |

## Part (b)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Comparisons (C) and Swaps (S) for each pass: 1st: C=7, S=6; 2nd: C=6, S=6; 3rd: C=5, S=3 | B3;2;1 | 6 correct; 5 correct; 3 correct – with number of comparisons and swaps being clearly identified for each of the three passes (may be earned in part (a)). Total: 3 |

---
2
\begin{enumerate}[label=(\alph*)]
\item Use a bubble sort to rearrange the following numbers into ascending order.

$$\begin{array} { l l l l l l l l } 
13 & 16 & 10 & 11 & 4 & 12 & 6 & 7
\end{array}$$
\item State the number of comparisons and the number of swaps (exchanges) for each of the first three passes.
\end{enumerate}

\hfill \mbox{\textit{AQA D1 2010 Q2 [8]}}