Question 6

Edexcel Computer Science June 2018 Paper 2GCSE13 marks

On the specification

(a)(i)
1.2 Algorithms6.1 Develop code
(a)(ii)
1.2 Algorithms6.1 Develop code
(a)(iii)
1.2 Algorithms
(b)
6.3 Data types and structures
(c)
5.2 Ethical and legal issues
Question text

6 P-Cubed uses GPS to track its delivery vans. (a) Programmers are working on algorithms to track the mileage of the delivery vans. Programmers are testing the algorithms with small datasets to determine if they will work efficiently with the very large dataset. (i) Here is the pseudo-code for an algorithm to find the number of mileages over 300. Here is a small dataset. It is stored in the array called ‘mileage’. 257, 821, 377, 108, 755, 308 Describe one inefficiency when executing the algorithm with this dataset. (2) (ii) Here is the pseudo-code for a different algorithm to find all the occurrences of mileage over 300. Here is a small dataset. It is stored in the array called ‘mileage’. 10, 20, 30, 40, 50, 60 Describe one inefficiency when executing the algorithm with this dataset. (2) (iii) The search algorithm will be used with a very large dataset. The efficiency of a linear search algorithm can be improved by preprocessing the dataset. State a type of pre-processing and explain how the algorithm in 6(a)(ii) could be changed to use the preprocessed data efficiently. (3) (b) Each delivery van has an identification number. Mileage is collected daily for every delivery van. A two-dimensional array is used to hold the mileage information for each delivery van. Complete the diagram to show column headings and example data for this data structure. (2) (c) The tracking system collects data about the location of vans at all times. The system calculates how long it takes to complete deliveries. Drivers can take the vans home in the evenings and at weekends. Explain two reasons why drivers may not want the tracking system to be used in the vans. (4) (Total for Question 6 = 13 marks)