题目
The twelve numbers in the list below are to be packed into bins of size , where is a positive integer.
When the first-fit bin packing algorithm is applied to the list, the following allocation is obtained.
Bin 1:
Bin 2:
Bin 3:
Bin 4:
(a) Based on the packing shown above, determine the possible values of . You must give reasons for your answer.
(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.
When the first-fit decreasing bin packing algorithm is applied to the list, the following allocation is obtained.
Bin 1:
Bin 2:
Bin 3:
Bin 4:
(c) Determine the value of . You must give a reason for your answer.
题目中文翻译
下面列表中的十二个数字要装入大小为 的箱子中,其中 是正整数。
当对列表应用首次适应装箱算法时,得到以下分配。
箱 1:
箱 2:
箱 3:
箱 4:
(a) 根据上面显示的装箱,确定 的可能值。必须给出理由。
(b) 原始的十二个数字列表要按升序排序。使用快速排序获得排序后的列表。应显示每次传递的结果并清楚地标出枢轴。
当对列表应用首次适应递减装箱算法时,得到以下分配。
箱 1:
箱 2:
箱 3:
箱 4:
(c) 确定 的值。必须给出理由。