Easy -1.3 This is a straightforward algorithmic execution question requiring mechanical application of bubble sort and first-fit decreasing. Part (a) involves routine step-by-step execution with no problem-solving, part (b) uses a standard formula (n(n-1)/2 for 8 values), and part (c) is basic bin-packing application. Decision maths D1 questions are typically procedural rather than conceptually challenging.
2. (a) The following list of numbers is to be sorted into descending order.
$$\begin{array} { l l l l l l }
35 & 23 & 10 & 46 & 24 & 11
\end{array}$$
Use the Bubble sort algorithm to obtain a sorted list, giving the state of the list at each stage where two values could be interchanged.
(b) Find the maximum number of interchanges needed when 8 values are sorted into descending order using the Bubble sort algorithm.
(c) Use the first-fit decreasing algorithm to fit the data in part (a) into bins of size 50. Explain how you decided in which bin to place the number 11.
(c) 11 could not go in 1st bin but could fit in 2nd bin
B1
(8)
**(a)** Giving 46 35 24 23 11 10 | M2 A2 |
**(b)** $7 + 6 + 5 + 4 + 3 + 2 + 1 = 28$ | A1 |
**(c)** 11 could not go in 1st bin but could fit in 2nd bin | B1 | (8)
---
2. (a) The following list of numbers is to be sorted into descending order.
$$\begin{array} { l l l l l l }
35 & 23 & 10 & 46 & 24 & 11
\end{array}$$
Use the Bubble sort algorithm to obtain a sorted list, giving the state of the list at each stage where two values could be interchanged.\\
(b) Find the maximum number of interchanges needed when 8 values are sorted into descending order using the Bubble sort algorithm.\\
(c) Use the first-fit decreasing algorithm to fit the data in part (a) into bins of size 50. Explain how you decided in which bin to place the number 11.\\
\hfill \mbox{\textit{Edexcel D1 Q2 [8]}}