3. A machinist has to cut the following seven lengths (in centimetres) of steel tubing.
$$\begin{array} { l l l l l l l }
150 & 104 & 200 & 60 & 184 & 84 & 120
\end{array}$$
- Perform a quick sort to put the seven lengths in descending order.
The machinist is to cut the lengths from rods that are each 240 cm long. You may assume that no waste is incurred during the cutting process.
- Explain how to use the first-fit decreasing bin-packing algorithm to find the minimum number of rods required. Show that, using this algorithm, five rods are needed.
(4 marks) - Find if it is possible to cut additional pieces with a total length of 300 cm from the five rods.
(1 mark)