Edexcel D1 2002 November — Question 6

Exam BoardEdexcel
ModuleD1 (Decision Mathematics 1)
Year2002
SessionNovember
TopicPermutations & Arrangements

6. \(\begin{array} { l l l l l l l l l l } 55 & 80 & 25 & 84 & 25 & 34 & 17 & 75 & 3 & 5 \end{array}\)
  1. The list of numbers above is to be sorted into descending order. Perform a bubble sort to obtain the sorted list, giving the state of the list after each complete pass. The numbers in the list represent weights, in grams, of objects which are to be packed into bins that hold up to 100 g .
  2. Determine the least number of bins needed.
  3. Use the first-fit decreasing algorithm to fit the objects into bins which hold up to 100 g .