Question 1
17 8 16 12 24 19 23 11 20 13 4
The eleven numbers listed above are to be packed into bins of size n where n is a positive integer. When the first-fit bin packing algorithm is applied to the eleven numbers, the bins are packed as shown below.
| Bin 1: | 17 | 8 | 12 | |
| Bin 2: | 16 | 24 | ||
| Bin 3: | 19 | 11 | 4 | |
| Bin 4: | 23 | 13 | ||
| Bin 5: | 20 |
Explain why this packing means that the value of n must be 40
(1)
The original list of eleven numbers is to be sorted into descending order.
Use a quick sort to obtain the fully sorted list. You must make your pivots clear.
(4)
Apply the first-fit decreasing bin packing algorithm to the fully sorted list to pack the numbers into bins of size 40
(2)