3. \(\quad \begin{array} { l l l l l l l l l l } 42 & 21 & 15 & 16 & 35 & 10 & 31 & 11 & 27 & 39 \end{array}\)
- Use the first-fit bin packing algorithm to determine how the numbers listed above can be packed into bins of size 65
- The list of numbers is to be sorted into descending order. Use a quick sort to obtain the sorted list. You should show the result of each pass and identify your pivots clearly.
- Use the first-fit decreasing bin packing algorithm on your ordered list to pack the numbers into bins of size 65
The nine distinct numbers below are to be sorted into descending order
$$\begin{array} { l l l l l l l l l }
23 & 14 & 17 & \boldsymbol { x } & 21 & 18 & 8 & 20 & 11
\end{array}$$
A bubble sort, starting at the left-hand end of the list, is to be used to obtain the sorted list. After the first complete pass, the list is
$$\begin{array} { l l l l l l l l l }
23 & 17 & \boldsymbol { x } & 21 & 18 & 14 & 20 & 11 & 8
\end{array}$$
After the second complete pass, the list is
$$\begin{array} { l l l l l l l l l }
23 & 17 & 21 & 18 & \boldsymbol { x } & 20 & 14 & 11 & 8
\end{array}$$
- Using this information, write down the smallest interval that must contain \(\boldsymbol { x }\). Give your answer as an inequality.