Question 5

Edexcel Further Maths October 2020 9FM0-3D A Level Decision Mathematics 1 - question paperA level7 marks

On the specification

(a)
3D 1.2 Bin packing, bubble sort and quick sort
(b)
3D 1.2 Bin packing, bubble sort and quick sort
(c)
3D 1.2 Bin packing, bubble sort and quick sort
Question text

5. The nine distinct numbers in the following list are to be packed into bins of size 50 23 17 19 x 24 8 18 10 21 When the first-fit bin packing algorithm is applied to the numbers in the list it results in the following allocation. Bin 1: 23 17 8 Bin 2: 19 x 10 Bin 3: 24 18 Bin 4: 21 (a) Explain why 13 < x < 21 (3) The same list of numbers is to be sorted into descending order. 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 23 19 17 24 x 18 10 21 8 (b) Using this information, write down the smallest interval that must contain x, giving your answer as an inequality. (2) When the first-fit decreasing bin packing algorithm is applied to the nine distinct numbers it results in the following allocation. Bin 1: 24 23 Bin 2: 21 19 10 Bin 3: 18 17 x Bin 4: 8 Given that only one of the bins is full and that x is an integer, (c) calculate the value of x. You must give reasons for your answer. (2) (Total for Question 5 is 7 marks)