ConceptConceptDocsDocuments

Pearson Edexcel IAL Mathematics D1.1 Algorithms Question Bank

Practise implementing algorithms on flow charts and lists, including sorting traces, bin allocations, searches and justified bounds from algorithm steps.

Syllabus
First assessment 2019
Course
Mathematics YMA01
Level
AS

Exam points

  • trace flow-chart outputs or list passes while keeping pivots and rounded values clear
  • use bin-packing allocations to justify limits for n from bin totals and failed placements
  • apply binary search by choosing pivots and rejecting the correct part of the sorted list

D1.1 - Algorithms question 1

[Maximum number: 4]
Figure 2

Figure 2

An algorithm for finding the positive real root of the equation 8x4+5x12=08 x^{4}+5 x-12=0 is described by the flow chart shown in Figure 2.

Question (a)

(a)

Use the flow chart, with a=1, to complete the table in the answer book, stating values to at least 6 decimal places. Give the final output correct to 5 decimal places.

Given that the value of the input a is a non-negative real number,

[ 4 ]

Question (b)

(b)

determine the set of values for a that cannot be used to find the positive real root of 8x4+5x12=08 x^{4}+5 x-12=0 using this flow chart.

D1.1 - Algorithms question 2

[Maximum number: 14]

1.81.42.61.62.80.93.10.81.22.40.6\begin{array}{lllllllllll}1.8 & 1.4 & 2.6 & 1.6 & 2.8 & 0.9 & 3.1 & 0.8 & 1.2 & 2.4 & 0.6\end{array}

1.81.42.61.62.80.93.10.81.22.40.6\begin{array}{lllllllllll} 1.8 & 1.4 & 2.6 & 1.6 & 2.8 & 0.9 & 3.1 & 0.8 & 1.2 & 2.4 & 0.6 \end{array}

Question (a)

(a)

Use the first-fit bin packing algorithm to determine how the numbers listed above can be packed into bins of size 5

The list is to be sorted into descending order.

[ 3 ]

Question (b)

(b)

Perform one pass of a bubble sort, starting at the left-hand end of the list. You must write down the list that results at the end of the first pass.

[ 1 ]

Question (c)

(c)

Write down the number of comparisons and the number of swaps performed during the first pass.

After a second pass using this bubble sort, the updated list is

2.61.82.81.63.11.41.22.40.90.80.6\begin{array}{lllllllllll} 2.6 & 1.8 & 2.8 & 1.6 & 3.1 & 1.4 & 1.2 & 2.4 & 0.9 & 0.8 & 0.6 \end{array}
[ 3 ]

Question (d)

(d)

Use a quick sort on this updated list to obtain the fully sorted list in descending order. You must make your pivots clear.

[ 4 ]

Question (e)

(e)

Apply the first-fit decreasing bin packing algorithm to the fully sorted list to pack the numbers into bins of size 5

[ 3 ]
All question bank results loaded