Edexcel D1 2021 June — Question 1 12 marks

Exam BoardEdexcel
ModuleD1 (Decision Mathematics 1)
Year2021
SessionJune
Marks12
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeBubble Sort Execution
DifficultyEasy -1.8 This is a routine algorithmic execution question requiring only mechanical application of standard D1 algorithms (bubble sort and bin packing) with no problem-solving or insight. Each part follows textbook procedures exactly, making it significantly easier than average A-level maths questions which typically require some mathematical reasoning.
Spec7.03j Sorting: bubble sort and shuttle sort7.03l Bin packing: next-fit, first-fit, first-fit decreasing, full bin

1. \(\begin{array} { l l l l l l l l l l l l l } 16 & 23 & 18 & 9 & 4 & 20 & 35 & 5 & 17 & 13 & 6 & 11 \end{array}\) The numbers in the list represent the weights, in kilograms, of twelve parcels. The parcels are to be transported in containers that will each hold a maximum weight of 45 kg .
  1. Calculate a lower bound for the number of containers needed. You must make your method clear.
  2. Use the first-fit bin packing algorithm to allocate the parcels to the containers.
  3. Carry out a bubble sort, starting at the left-hand end of the list, to produce a list of the weights in descending order. You should only give the state of the list after each pass.
  4. Use the first-fit decreasing bin packing algorithm to allocate the parcels to the containers.

No marking scheme content provided.
No marking scheme content provided.

---
1.

$\begin{array} { l l l l l l l l l l l l l } 16 & 23 & 18 & 9 & 4 & 20 & 35 & 5 & 17 & 13 & 6 & 11 \end{array}$\\
The numbers in the list represent the weights, in kilograms, of twelve parcels. The parcels are to be transported in containers that will each hold a maximum weight of 45 kg .
\begin{enumerate}[label=(\alph*)]
\item Calculate a lower bound for the number of containers needed. You must make your method clear.
\item Use the first-fit bin packing algorithm to allocate the parcels to the containers.
\item Carry out a bubble sort, starting at the left-hand end of the list, to produce a list of the weights in descending order. You should only give the state of the list after each pass.
\item Use the first-fit decreasing bin packing algorithm to allocate the parcels to the containers.
\end{enumerate}

\hfill \mbox{\textit{Edexcel D1 2021 Q1 [12]}}