AQA D1 2012 June — Question 2 5 marks

Exam BoardAQA
ModuleD1 (Decision Mathematics 1)
Year2012
SessionJune
Marks5
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeShuttle Sort Execution
DifficultyEasy -1.8 This is a purely procedural question requiring mechanical execution of a shuttle sort algorithm with the first three passes already shown as a template. It tests only recall and careful application of a standard algorithm with no problem-solving, proof, or conceptual understanding required—significantly easier than typical A-level questions.
Spec7.03j Sorting: bubble sort and shuttle sort

2 A student is using a shuttle sort algorithm to rearrange a set of numbers into ascending order. Her correct solution for the first three passes is as follows.

Question 2:
Part (a):
AnswerMarks Guidance
AnswerMarks Guidance
1st pass: 5 comparisonsB1
2nd pass: 4 comparisons; 3rd pass: 3 comparisonsB1 Both needed for second mark
Part (b):
AnswerMarks Guidance
AnswerMarks Guidance
1st pass: 1 swapB1
2nd pass: 1 swap; 3rd pass: 0 swapsB1 Both needed for second mark
Part (c):
AnswerMarks Guidance
AnswerMarks Guidance
No, the algorithm is not complete because no pass with zero swaps has been completed (3rd pass still had a swap in 2nd pass context) / the list is sorted but algorithm requires a complete pass with no swaps to terminateB1 Must give a reason; accept "not complete as 3rd pass had zero swaps so one more pass needed to confirm"
# Question 2:

## Part (a):

| Answer | Marks | Guidance |
|--------|-------|----------|
| 1st pass: 5 comparisons | B1 | |
| 2nd pass: 4 comparisons; 3rd pass: 3 comparisons | B1 | Both needed for second mark |

## Part (b):

| Answer | Marks | Guidance |
|--------|-------|----------|
| 1st pass: 1 swap | B1 | |
| 2nd pass: 1 swap; 3rd pass: 0 swaps | B1 | Both needed for second mark |

## Part (c):

| Answer | Marks | Guidance |
|--------|-------|----------|
| No, the algorithm is not complete because no pass with zero swaps has been completed (3rd pass still had a swap in 2nd pass context) / the list is sorted but algorithm requires a complete pass with no swaps to terminate | B1 | Must give a reason; accept "not complete as 3rd pass had zero swaps so one more pass needed to confirm" |

---
2 A student is using a shuttle sort algorithm to rearrange a set of numbers into ascending order.

Her correct solution for the first three passes is as follows.

\hfill \mbox{\textit{AQA D1 2012 Q2 [5]}}