| Exam Board | OCR |
|---|---|
| Module | D1 (Decision Mathematics 1) |
| Year | 2015 |
| Session | June |
| Marks | 13 |
| Paper | Download PDF ↗ |
| Mark scheme | Download PDF ↗ |
| Topic | Sorting Algorithms |
| Type | Bubble Sort Execution |
| Difficulty | Easy -1.8 This is a purely procedural question requiring mechanical execution of two standard sorting algorithms with no problem-solving or insight. Students simply follow the algorithm steps they've memorized, count comparisons/swaps, and make a basic efficiency comparison—all routine recall and application for D1. |
| Spec | 7.03j Sorting: bubble sort and shuttle sort7.03k Sorting: quick sort |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| 7, 9, 15, 10, 4, 26 | B1 | Correct list after first pass |
| 5 comparisons | B1 | |
| 4 swaps | B1 |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| 7, 4, 9, 10, 15, 26 | B1 | Correct list after fourth pass |
| 3 comparisons, 1 swap | B1 | Both correct |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| 15 comparisons | B1 | \(5+4+3+2+1 = 15\) |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| 7, 15, 9, 26, 10, 4 | B1 | Correct list |
| 1 comparison, 1 swap | B1 | Both correct |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| 7, 9, 15, 26, 10, 4 | B1 | Correct list after fourth pass |
| 4 comparisons, 3 swaps | B1 | Both correct |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| 5 comparisons, 0 swaps | B1 | Both correct |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| Bubble sort is more efficient | B1 | |
| Bubble sort uses fewer comparisons (15 vs at least 15 for shuttle) | B1 | Valid supporting reason |
# Question 1:
## Part (i)
| Answer | Marks | Guidance |
|--------|-------|----------|
| 7, 9, 15, 10, 4, 26 | B1 | Correct list after first pass |
| 5 comparisons | B1 | |
| 4 swaps | B1 | |
## Part (ii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| 7, 4, 9, 10, 15, 26 | B1 | Correct list after fourth pass |
| 3 comparisons, 1 swap | B1 | Both correct |
## Part (iii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| 15 comparisons | B1 | $5+4+3+2+1 = 15$ |
## Part (iv)
| Answer | Marks | Guidance |
|--------|-------|----------|
| 7, 15, 9, 26, 10, 4 | B1 | Correct list |
| 1 comparison, 1 swap | B1 | Both correct |
## Part (v)
| Answer | Marks | Guidance |
|--------|-------|----------|
| 7, 9, 15, 26, 10, 4 | B1 | Correct list after fourth pass |
| 4 comparisons, 3 swaps | B1 | Both correct |
## Part (vi)
| Answer | Marks | Guidance |
|--------|-------|----------|
| 5 comparisons, 0 swaps | B1 | Both correct |
## Part (vii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Bubble sort is more efficient | B1 | |
| Bubble sort uses fewer comparisons (15 vs at least 15 for shuttle) | B1 | Valid supporting reason |
---
1 The following list is to be sorted into increasing order, from smallest to largest.
$$\begin{array} { l l l l l l }
15 & 7 & 9 & 26 & 10 & 4
\end{array}$$
Bubble sort is to be used, starting at the left-hand end of the list, so that after the completion of the first pass the largest value will be at the right-hand end of the list.\\
\begin{enumerate}[label=(\roman*)]
\item Write down the list that results at the end of the first pass through bubble sort. Write down the number of comparisons and the number of swaps that were made in this pass.
\item After 3 passes the list is
$$\begin{array} { l l l l l l }
7 & 9 & 4 & 10 & 15 & 26
\end{array}$$
Write down the list that results at the end of the fourth pass through bubble sort. Write down the number of comparisons and the number of swaps that were made in this pass.
\item How many comparisons are needed in total to sort the list using bubble sort?
Shuttle sort is then used to sort the original list, into increasing order, starting at the left-hand end of the list.
\item Write down the list that results at the end of the first pass through shuttle sort. Write down the number of comparisons and the number of swaps that were made in this pass.
\item After 3 passes the list is
$$\begin{array} { l l l l l l }
7 & 9 & 15 & 26 & 10 & 4
\end{array}$$
Write down the list that results at the end of the fourth pass through shuttle sort. Write down the number of comparisons and the number of swaps that were made in this pass.
\item How many comparisons and how many swaps are made in the fifth pass?
In sorting the original list, both methods use a total of 9 swaps.
\item Which of the two methods is the more efficient at sorting this list? Support your answer with a reason.
\end{enumerate}
\hfill \mbox{\textit{OCR D1 2015 Q1 [13]}}