OCR D1 2012 January — Question 1 6 marks

Exam BoardOCR
ModuleD1 (Decision Mathematics 1)
Year2012
SessionJanuary
Marks6
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeShuttle Sort Execution
DifficultyEasy -1.8 This is a purely algorithmic execution question requiring mechanical application of shuttle sort with no problem-solving or mathematical insight. Students simply follow the algorithm step-by-step, counting operations—significantly easier than typical A-level questions that require conceptual understanding or multi-step reasoning.
Spec7.03j Sorting: bubble sort and shuttle sort

Tom has some packages that he needs to sort into order of decreasing weight. The weights, in kg, given on the packages are as follows. 3 \quad 6 \quad 2 \quad 6 \quad 5 \quad 7 \quad 1 \quad 4 \quad 9 Use shuttle sort to put the weights into decreasing order (from largest to smallest). Show the result at the end of each pass through the algorithm and write down the number of comparisons and the number of swaps used in each pass. Write down the total number of passes, the total number of comparisons and the total number of swaps used. [6]

Tom has some packages that he needs to sort into order of decreasing weight. The weights, in kg, given on the packages are as follows.

3 \quad 6 \quad 2 \quad 6 \quad 5 \quad 7 \quad 1 \quad 4 \quad 9

Use shuttle sort to put the weights into decreasing order (from largest to smallest). Show the result at the end of each pass through the algorithm and write down the number of comparisons and the number of swaps used in each pass. Write down the total number of passes, the total number of comparisons and the total number of swaps used. [6]

\hfill \mbox{\textit{OCR D1 2012 Q1 [6]}}