Question 1

OCR B (MEI) Further Maths June 2023 Modelling with algorithms (Y433-01)A level7 marks

On the specification

(a)
A10-A11 Modelling with Algorithms: Packing algorithms
(b)
A7-A9 Modelling with Algorithms: Sorting algorithms
(c)
A10-A11 Modelling with Algorithms: Packing algorithms
Question text

1 Ten suitcases are to be transported in containers. Each container can hold a maximum of nkg, where n is a positive integer. The total weight of the ten suitcases is 216 kg. You are given that at least 4 containers are needed to transport all ten suitcases. (a) Determine the maximum value of n for which any set of 10 suitcases with total weight 216 kg needs at least 4 containers. [2] The exact weights, in kg, of the suitcases are: 17 23 18 14 26 21 24 15 31 27 (b) Apply the quick sort algorithm to sort the list of numbers into descending order. You should use the first value as the pivot for each sublist. [3] The first fit decreasing algorithm is applied to the sorted list of numbers. The following allocation of suitcases to containers is obtained. Container 1: 31 27 Container 2: 26 24 18 Container 3: 23 21 17 Container 4: 15 14 (c) Determine the possible values of n that are consistent with this result from applying the first fit decreasing algorithm to the sorted list of these weights. [2]