1.
\(\begin{array} { l l l l l l l l l l l l l } 16 & 23 & 18 & 9 & 4 & 20 & 35 & 5 & 17 & 13 & 6 & 11 \end{array}\)
The numbers in the list represent the weights, in kilograms, of twelve parcels. The parcels are to be transported in containers that will each hold a maximum weight of 45 kg .
- Calculate a lower bound for the number of containers needed. You must make your method clear.
- Use the first-fit bin packing algorithm to allocate the parcels to the containers.
- Carry out a bubble sort, starting at the left-hand end of the list, to produce a list of the weights in descending order. You should only give the state of the list after each pass.
- Use the first-fit decreasing bin packing algorithm to allocate the parcels to the containers.