Question 1
Edexcel Further Maths June 2024 9FM0-3D A Level Decision Mathematics 1A 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
1. 17 8 16 12 24 19 23 11 20 13 4 The eleven numbers listed above are to be packed into bins of size n where n is a positive integer. When the first-fit bin packing algorithm is applied to the eleven numbers, the bins are packed as shown below. Bin 1: 17 8 12 Bin 2: 16 24 Bin 3: 19 11 4 Bin 4: 23 13 Bin 5: 20 (a) Explain why this packing means that the value of n must be 40 (1) The original list of eleven numbers is to be sorted into descending order. (b) Use a quick sort to obtain the fully sorted list. You must make your pivots clear. (4) (c) Apply the first-fit decreasing bin packing algorithm to the fully sorted list to pack the numbers into bins of size 40 (2) (Total for Question 1 is 7 marks)