Edexcel FD1 AS 2024 June — Question 1

Exam BoardEdexcel
ModuleFD1 AS (Further Decision 1 AS)
Year2024
SessionJune
TopicSorting Algorithms

1. $$\begin{array} { l l l l l l l l l l l } 4 & 6.5 & 7 & 1.3 & 2 & 5 & 1.5 & 6 & 4.5 & 6 & 1 \end{array}$$ The list of eleven numbers shown above is to be sorted into descending order.
  1. Carry out a quick sort to produce the sorted list. You should show the result of each pass and identify the pivots clearly.
  2. Use the first-fit decreasing bin packing algorithm to pack the numbers into bins of size 10
  3. Determine whether your answer to part (b) uses the minimum number of bins. You must justify your answer. A different list of eleven numbers is to be sorted into descending order using a bubble sort. The list after the second pass is
    1.6
    1.7
    1.5
    3.8
    3.3
    4.5
    4.8
    5.6
    5.4
    6.7
    9.1
  4. Explain how you know that at least one of the first two passes of the bubble sort was not carried out correctly.