OCR Further Discrete AS 2021 November — Question 2 11 marks

Exam BoardOCR
ModuleFurther Discrete AS (Further Discrete AS)
Year2021
SessionNovember
Marks11
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeNext-Fit Bin Packing
DifficultyModerate -0.3 This is a straightforward application of standard bin-packing algorithms with clear procedures. Part (a) requires mechanical execution of three well-defined algorithms, part (b) tests basic understanding of online/offline terminology, and part (c) requires some trial-and-error optimization but no sophisticated insight. The question is slightly easier than average because it's mostly procedural with minimal problem-solving demand.
Spec7.03l Bin packing: next-fit, first-fit, first-fit decreasing, full bin7.03m Packing extensions: 2D/3D packing and knapsack problems

2 Seven items need to be packed into bins. Each bin has capacity 30 kg . The sizes of the items, in kg, in the order that they are received, are as follows.
12
23
15
18
8
7
5
  1. Find the packing that results using each of these algorithms.
    1. The next-fit method
    2. The first-fit method
    3. The first-fit decreasing method
  2. A student claims that all three methods from part (a) can be used for both 'online' and 'offline' lists. Explain why the student is wrong. The bins of capacity 30 kg are replaced with bins of capacity \(M \mathrm {~kg}\), where \(M\) is an integer.
    The item of size 23 kg can be split into two items, of sizes \(x \mathrm {~kg}\) and \(( 23 - x ) \mathrm { kg }\), where \(x\) may be any integer value you choose from 1 to 11. No other item can be split.
  3. Determine the smallest value of \(M\) for which four bins are needed to pack these eight items. Explain your reasoning carefully.

Question 2:
AnswerMarks Guidance
2(a) (i)
Bin 1 12
Bin 2 23
Bin 3 15
Bin 4 18 8
AnswerMarks
Bin 5 7 5M1
A1
AnswerMarks
[2]1.1
1.1Bins 1 and 2 correct
All correct
AnswerMarks Guidance
2(a) (ii)
Bin 1 12 15
Bin 2 23 7
Bin 3 18 8
Bin 4 5
AnswerMarks
Bin 5M1
A1
AnswerMarks
[2]1.1
1.1Bins 1 and 2 correct
All correct
AnswerMarks Guidance
2(a) (iii)
First-fit decreasing method
Bin 1 23 7
Bin 2 18 12
Bin 3 15 8 5
Bin 4
AnswerMarks
Bin 5M1
A1
AnswerMarks
[2]1.1
1.1Ordered list may be seen
Bins 1 and 2 correct
All correct
AnswerMarks Guidance
2(b) With ‘online’ lists the items are presented one at a
time and the whole list is not known until the end.
With next-fit and first-fit the items are placed in
the order they appear in the list, so these methods
can be used ‘offline’ or ‘online’.
However, for first-fit decreasing the whole list
needs to be known before it can be sorted, so
first-fit decreasing can only be used for an
AnswerMarks
‘offline’ list.B1
B1
AnswerMarks
[2]1.2
2.3Evidence of understanding what ‘online’ means
Evidence of realising that ffd cannot be used with an online list
(or implied from an appropriate statement about next-fit and first-fit)
AnswerMarks Guidance
Bin 112
Bin 223
Bin 315
Bin 418 8
Bin 57 5
Bin 112 15
Bin 223 7
Bin 318 8
Bin 45
Bin 5
AnswerMarks Guidance
Bin 123 7
Bin 218 12
Bin 315 8
Bin 4
Bin 5
AnswerMarks Guidance
2(c) 88 ÷ 4 = 22, so M is at least 22
But it is not possible to fill 4 bins of capacity 22
Since 22 – 18 = 4 which is less than 5
So the 23 would have to be split as 4 and 19
And then there is no 3 to go with the 19
M = 23 is possible
e.g. 23 – x and x, 18 + 5, 15 + 8, 12 + 7
AnswerMarks
Hence, least M is 23M1
A1
B1
AnswerMarks
[3]1.1
2.4
AnswerMarks
2.2aIdentifying that M must be at least 22
Showing that M = 22 is not possible
Fully correct explanation
Showing that M = 23 is possible
Question 2:
2 | (a) | (i) | Next-fit method
Bin 1 12
Bin 2 23
Bin 3 15
Bin 4 18 8
Bin 5 7 5 | M1
A1
[2] | 1.1
1.1 | Bins 1 and 2 correct
All correct
2 | (a) | (ii) | First-fit method
Bin 1 12 15
Bin 2 23 7
Bin 3 18 8
Bin 4 5
Bin 5 | M1
A1
[2] | 1.1
1.1 | Bins 1 and 2 correct
All correct
2 | (a) | (iii) | 23 18 15 12 8 7 5
First-fit decreasing method
Bin 1 23 7
Bin 2 18 12
Bin 3 15 8 5
Bin 4
Bin 5 | M1
A1
[2] | 1.1
1.1 | Ordered list may be seen
Bins 1 and 2 correct
All correct
2 | (b) | With ‘online’ lists the items are presented one at a
time and the whole list is not known until the end.
With next-fit and first-fit the items are placed in
the order they appear in the list, so these methods
can be used ‘offline’ or ‘online’.
However, for first-fit decreasing the whole list
needs to be known before it can be sorted, so
first-fit decreasing can only be used for an
‘offline’ list. | B1
B1
[2] | 1.2
2.3 | Evidence of understanding what ‘online’ means
Evidence of realising that ffd cannot be used with an online list
(or implied from an appropriate statement about next-fit and first-fit)
Bin 1 | 12
Bin 2 | 23
Bin 3 | 15
Bin 4 | 18 | 8
Bin 5 | 7 | 5
Bin 1 | 12 | 15
Bin 2 | 23 | 7
Bin 3 | 18 | 8
Bin 4 | 5
Bin 5
Bin 1 | 23 | 7
Bin 2 | 18 | 12
Bin 3 | 15 | 8 | 5
Bin 4
Bin 5
2 | (c) | 88 ÷ 4 = 22, so M is at least 22
But it is not possible to fill 4 bins of capacity 22
Since 22 – 18 = 4 which is less than 5
So the 23 would have to be split as 4 and 19
And then there is no 3 to go with the 19
M = 23 is possible
e.g. 23 – x and x, 18 + 5, 15 + 8, 12 + 7
Hence, least M is 23 | M1
A1
B1
[3] | 1.1
2.4
2.2a | Identifying that M must be at least 22
Showing that M = 22 is not possible
Fully correct explanation
Showing that M = 23 is possible
2 Seven items need to be packed into bins. Each bin has capacity 30 kg . The sizes of the items, in kg, in the order that they are received, are as follows.\\
12\\
23\\
15\\
18\\
8\\
7\\
5
\begin{enumerate}[label=(\alph*)]
\item Find the packing that results using each of these algorithms.
\begin{enumerate}[label=(\roman*)]
\item The next-fit method
\item The first-fit method
\item The first-fit decreasing method
\end{enumerate}\item A student claims that all three methods from part (a) can be used for both 'online' and 'offline' lists.

Explain why the student is wrong.

The bins of capacity 30 kg are replaced with bins of capacity $M \mathrm {~kg}$, where $M$ is an integer.\\
The item of size 23 kg can be split into two items, of sizes $x \mathrm {~kg}$ and $( 23 - x ) \mathrm { kg }$, where $x$ may be any integer value you choose from 1 to 11. No other item can be split.
\item Determine the smallest value of $M$ for which four bins are needed to pack these eight items.

Explain your reasoning carefully.
\end{enumerate}

\hfill \mbox{\textit{OCR Further Discrete AS 2021 Q2 [11]}}