Edexcel A-Level Mathematics AS D1.1 - Algorithms Questions

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

6 questions in this syllabus scope, with question parts counted together.

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.1 - Algorithms and flow-chart implementation

  • complete a flow-chart table from a given input and give the final output to the required accuracy
  • determine values of a that cannot locate the positive root of a stated equation

Question 1

D1
[Maximum number: 6]
Figure A

Figure A

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

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,

Flow-chart working table

Flow-chart working table

[ 4 ]

Question (b)

(b)

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

[ 2 ]

D1.1.2 - Bin packing, sorting and binary search

4 more questions
  • Show quick sort or bubble sort passes, including pivots, comparisons and swaps.
  • Apply first-fit or first-fit decreasing and record the item contents of each bin.
  • Trace binary search by naming the pivot and the rejected part of the sorted list.

Question 1

D1
[Maximum number: 13]

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

[ 3 ]

Question (b)

(b)

The list is to be sorted into descending order.

[ 3 ]

Question (i)

(i)

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 (ii)

(ii)

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

[ 2 ]

Question (c)

(c)

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}

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 (d)

(d)

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

[ 3 ]