AQA D1 2012 January — Question 1 5 marks

Exam BoardAQA
ModuleD1 (Decision Mathematics 1)
Year2012
SessionJanuary
Marks5
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeShell Sort Execution
DifficultyEasy -1.2 This is a straightforward algorithmic execution question requiring mechanical application of the Shell sort procedure with no problem-solving or insight needed. Students simply follow the standard gap sequence (4, 2, 1 for 8 elements) and perform comparisons/swaps at each pass. It's easier than average A-level maths as it tests procedural recall rather than mathematical reasoning, though the multi-step nature prevents it from being trivial.
Spec7.03j Sorting: bubble sort and shuttle sort

1 Use a Shell sort to rearrange the following numbers into ascending order, showing the new arrangement after each pass. \(\begin{array} { l l l l l l l l } 37 & 25 & 16 & 12 & 36 & 24 & 13 & 11 \end{array}\) (5 marks) PART REFERENCE REFERENCE

Question 1: Shell Sort
AnswerMarks Guidance
AnswerMarks Guidance
Gap = 4: \(25\ 16\ 12\ 36\ 24\ 13\ 11\ 37\) (swap 37 and 25, no other swaps needed... checking pairs 4 apart: 37↔36? no. Working: compare positions 1,5: 37,24→swap; 2,6: 25,13→swap; 3,7: 16,11→swap; 4,8: 12,37→swap) After pass 1 (gap 4): \(24\ 13\ 11\ 12\ 37\ 25\ 16\ 36\)M1 For attempting gap of 4, must show working
After pass 2 (gap 2): \(11\ 12\ 16\ 13\ 24\ 25\ 37\ 36\)A1 Correct result after gap 2 pass
After pass 3 (gap 1): \(11\ 12\ 13\ 16\ 24\ 25\ 36\ 37\)A1 Correct final sorted list
Correct working shown for each passB1 All passes shown
Fully correct solution with all passesA1 cao
# Question 1: Shell Sort

| Answer | Marks | Guidance |
|--------|-------|----------|
| Gap = 4: $25\ 16\ 12\ 36\ 24\ 13\ 11\ 37$ (swap 37 and 25, no other swaps needed... checking pairs 4 apart: 37↔36? no. Working: compare positions 1,5: 37,24→swap; 2,6: 25,13→swap; 3,7: 16,11→swap; 4,8: 12,37→swap) After pass 1 (gap 4): $24\ 13\ 11\ 12\ 37\ 25\ 16\ 36$ | M1 | For attempting gap of 4, must show working |
| After pass 2 (gap 2): $11\ 12\ 16\ 13\ 24\ 25\ 37\ 36$ | A1 | Correct result after gap 2 pass |
| After pass 3 (gap 1): $11\ 12\ 13\ 16\ 24\ 25\ 36\ 37$ | A1 | Correct final sorted list |
| Correct working shown for each pass | B1 | All passes shown |
| Fully correct solution with all passes | A1 | cao |

---
1 Use a Shell sort to rearrange the following numbers into ascending order, showing the new arrangement after each pass.\\
$\begin{array} { l l l l l l l l } 37 & 25 & 16 & 12 & 36 & 24 & 13 & 11 \end{array}$\\
(5 marks)

PART REFERENCE REFERENCE\\

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