Question 6
Edexcel Further Maths June 2022 9FM0-3D A Level Decision Mathematics 1A level12 marks
On the specification
- (a)
- 3D 1.1 Algorithms: order and implementation (3D Decision Maths 1)
- (b)(i)
- 3D 1.2 Bin packing, bubble sort and quick sort
- (b)(ii)
- 3D 1.2 Bin packing, bubble sort and quick sort
- (c)
- 3D 1.2 Bin packing, bubble sort and quick sort
- (d)
- 3D 1.1 Algorithms: order and implementation (3D Decision Maths 1)
Question text
6. The following algorithm determines the number of comparisons made when Prim’s algorithm is applied to Kn Step 1 Start Step 2 Input the value of n Step 3 Let a = 1 Step 4 Let b = n – 2 Step 5 Let c = b Step 6 Let a = a + 1 Step 7 Let b = b – 1 Step 8 Let c = c + (a×b) + (a – 1) Step 9 If b > 0 go to Step 6 Step 10 Output c Step 11 Stop (a) For K5, complete the table in the answer book to show the results obtained at each step of the algorithm. (3) B 17 19 21 15 28 A C 23 14 24 20 D 13 E Figure 4 The weights of the ten arcs in Figure 4 are 17 21 24 14 23 13 15 19 28 20 (b) (i) Starting at the left‑hand end of the above list, sort the list into ascending order using bubble sort. You need only write down the state of the list at the end of each pass. (ii) Find the total number of comparisons performed during the sort. (5) (c) Find the maximum total number of comparisons required to sort the weights of the 10 arcs of K5 into ascending order using bubble sort. (1) It is given that the maximum total number of comparisons required to sort the weights of the arcs of Kn into ascending order using bubble sort is λn(n – 1)(n + 1)(n – 2) where λ is a constant. (d) Determine the maximum total number of comparisons required to sort the weights of the arcs of K50 into ascending order using bubble sort. You must make your method and working clear. (3) (Total for Question 6 is 12 marks)