As para Ut d1 U1 Test
As para Ut d1 U1 Test
Figure 1
© Pearson Education Ltd 2018. Copying permitted for purchasing institution only. This material is not copyright free.
1
Decision Mathematics 1 Unit Test 1: Algorithms and graph theory
a Complete the table, recording the results of each step as the algorithm is applied.
You may not need all of the rows.
Give the values of A, B, C and D to 3 decimal places and the values of E to 1
significant figure. (3 marks)
A B n C D E is n > 3?
b If the restriction of n > 3 is changed to n > 100, state the value of E when
n = 100. (1 mark)
© Pearson Education Ltd 2018. Copying permitted for purchasing institution only. This material is not copyright free.
2
Decision Mathematics 1 Unit Test 1: Algorithms and graph theory
S T S = T to 2 dp?
7 5 4 6 8
a Perform the first pass of a bubble sort, showing each comparison. (2 marks)
b Write the number of comparisons and the number of swaps used in this first
pass. (1 mark)
c State which numbers, if any, are guaranteed to be in their correct final position
after the first pass. (1 mark)
© Pearson Education Ltd 2018. Copying permitted for purchasing institution only. This material is not copyright free.
3
Decision Mathematics 1 Unit Test 1: Algorithms and graph theory
5 Use a quick sort to arrange the numbers below into ascending order.
65 43 24 64 46 13 71 23 16 45
(4 marks)
6 Look at Figure 3.
Figure 3
© Pearson Education Ltd 2018. Copying permitted for purchasing institution only. This material is not copyright free.
4
Decision Mathematics 1 Unit Test 1: Algorithms and graph theory
7 Look at Figure 5.
Figure 5
A B C D E
A – 6 – 7 –
B 6 – 4 – 12
C – 4 – 5 –
D – – 5 – –
E – 10 – – –
8 Below are the lengths of seven pieces of wood to be cut from 1.25 m strips.
All lengths are given in cm.
40 55 65 40 40 45 40 45 70 40 45
a Use the first-fit decreasing algorithm to calculate how many 1.25 m strips are
required and how much wood will be wasted. (4 marks)
b i Use the full-bin algorithm to calculate how many 1.25 m strips are required. (2 marks)
ii State if your solution for part bi is optimal. Justify your answer. (2 marks)
© Pearson Education Ltd 2018. Copying permitted for purchasing institution only. This material is not copyright free.
5