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

IAL 2024 Jan D1 Q6

A Level / Edexcel / D1

IAL 2024 Jan Paper · Question 6

题目

Problem

The twelve numbers in the list below are to be packed into bins of size nn, where nn is a positive integer.

2831525163518221127151328 \quad 31 \quad 5 \quad 25 \quad 16 \quad 35 \quad 18 \quad 22 \quad 11 \quad 27 \quad 15 \quad 13

When the first-fit bin packing algorithm is applied to the list, the following allocation is obtained.

Bin 1: 2831528 \quad 31 \quad 5

Bin 2: 25161825 \quad 16 \quad 18

Bin 3: 35221535 \quad 22 \quad 15

Bin 4: 27131127 \quad 13 \quad 11

(a) Based on the packing shown above, determine the possible values of nn. You must give reasons for your answer.

(3)

(b) The original list of twelve numbers is to be sorted into ascending order. Use a quick sort to obtain the sorted list. You should show the result of each pass and identify your pivots clearly.

(4)

When the first-fit decreasing bin packing algorithm is applied to the list, the following allocation is obtained.

Bin 1: 3531535 \quad 31 \quad 5

Bin 2: 28271628 \quad 27 \quad 16

Bin 3: 25221825 \quad 22 \quad 18

Bin 4: 15131115 \quad 13 \quad 11

(c) Determine the value of nn. You must give a reason for your answer.

(2)
题目中文翻译

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

2831525163518221127151328 \quad 31 \quad 5 \quad 25 \quad 16 \quad 35 \quad 18 \quad 22 \quad 11 \quad 27 \quad 15 \quad 13

当对列表应用首次适应装箱算法时,得到以下分配。

箱 1:2831528 \quad 31 \quad 5

箱 2:25161825 \quad 16 \quad 18

箱 3:35221535 \quad 22 \quad 15

箱 4:27131127 \quad 13 \quad 11

(a) 根据上面显示的装箱,确定 nn 的可能值。必须给出理由。

(b) 原始的十二个数字列表要按升序排序。使用快速排序获得排序后的列表。应显示每次传递的结果并清楚地标出枢轴。

当对列表应用首次适应递减装箱算法时,得到以下分配。

箱 1:3531535 \quad 31 \quad 5

箱 2:28271628 \quad 27 \quad 16

箱 3:25221825 \quad 22 \quad 18

箱 4:15131115 \quad 13 \quad 11

(c) 确定 nn 的值。必须给出理由。

解答