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

IAL 2022 Jan D1 Q1

A Level / Edexcel / D1

IAL 2022 Jan Paper · Question 1

题目

Problem

The numbers in the list shown above are the weights, in kilograms, of ten boxes. The boxes are to be transported in containers that will each hold a maximum weight of 40 kilograms.

179158201328412517 \quad 9 \quad 15 \quad 8 \quad 20 \quad 13 \quad 28 \quad 4 \quad 12 \quad 5

(a) Calculate a lower bound for the number of containers that will be needed to transport the boxes. You must show your working.

(2)

(b) Use the first-fit bin packing algorithm to allocate the boxes to the containers.

(3)

(c) Using the list provided, carry out a quick sort to produce a list of the weights in ascending order. You must make your pivots clear.

(3)

(d) Use the binary search algorithm to try to locate the weight of 9 in the sorted list. Clearly indicate how you choose your pivots and which part of the list is being rejected at each stage.

(3)
题目中文翻译

上面列表中的数字是十个箱子的重量(单位:千克)。箱子将用容器运输,每个容器最多可容纳 40 千克。

179158201328412517 \quad 9 \quad 15 \quad 8 \quad 20 \quad 13 \quad 28 \quad 4 \quad 12 \quad 5

(a) 计算运输箱子所需容器数量的下界。必须展示计算过程。

(b) 使用首次适应装箱算法将箱子分配给容器。

(c) 使用提供的列表,执行快速排序以产生升序的重量列表。必须清楚标出枢轴。

(d) 使用二分搜索算法尝试在排序列表中定位重量 9。清楚说明如何选择枢轴以及每个阶段拒绝列表的哪一部分。

解答