Skip to content
CalcGospel 國際數學圖譜
返回

IAL 2021 Oct D1 Q7

A Level / Edexcel / D1

IAL 2021 Oct Paper · Question 7

题目

Problem

The numbers listed below are to be packed into bins of size nn, where nn is a positive integer.

142023171522192513283214 \quad 20 \quad 23 \quad 17 \quad 15 \quad 22 \quad 19 \quad 25 \quad 13 \quad 28 \quad 32

A lower bound for the number of bins required is 4.

(a) Determine the range of possible values of nn. You must make your method clear.

(3)

(b) Carry out a quick sort to produce a list of the numbers in descending order. You should show the result of each pass and identify your pivots clearly.

(4)

When the first-fit bin packing algorithm is applied to the original list of numbers, the following allocation is achieved.

Bin 1: 1420231514 \quad 20 \quad 23 \quad 15

Bin 2: 1722191317 \quad 22 \quad 19 \quad 13

Bin 3: 252825 \quad 28

Bin 4: 3232

When the first-fit decreasing bin packing algorithm is applied to the sorted list of numbers, the following allocation is achieved.

Bin 1: 322832 \quad 28

Bin 2: 25232225 \quad 23 \quad 22

Bin 3: 20191720 \quad 19 \quad 17

Bin 4: 14131514 \quad 13 \quad 15

(c) Determine the value of nn. You must explain your reasoning fully.

(3)
题目中文翻译

下面列出的数字要装入大小为 nn 的箱子中,其中 nn 是正整数。

142023171522192513283214 \quad 20 \quad 23 \quad 17 \quad 15 \quad 22 \quad 19 \quad 25 \quad 13 \quad 28 \quad 32

所需箱子数量的下界为 4。

(a) 确定 nn 的可能取值范围。必须清楚说明方法。

(b) 执行快速排序以产生降序的数字列表。应显示每次传递的结果并清楚地标出枢轴。

当对原始数字列表应用首次适应装箱算法时,获得以下分配。

箱 1:1420231514 \quad 20 \quad 23 \quad 15

箱 2:1722191317 \quad 22 \quad 19 \quad 13

箱 3:252825 \quad 28

箱 4:3232

当对排序后的数字列表应用首次适应递减装箱算法时,获得以下分配。

箱 1:322832 \quad 28

箱 2:25232225 \quad 23 \quad 22

箱 3:20191720 \quad 19 \quad 17

箱 4:14131514 \quad 13 \quad 15

(c) 确定 nn 的值。必须完全解释推理过程。

解答