Decision 1: Algorithms, graphs, shortest paths, route inspection and TSP – Edexcel A Level Further Mathematics (9FM0)
43 questions · page 3 of 3 · Clear filters
Question text
6.
B
15
E
33
17
32
30
D
75
95
F
A
50
50
25
16
41
70
G
105
10
C
113
H
Figure 4
In Figure 4 the weights on the arcs represent distances.
(a) (i) Use Dijkstra’s algorithm to find the shortest path from A to H.
(ii) State the length of the shortest path from A to H.
(6)
One application of Dijkstra’s algorithm has order n 2 , where n is the number of nodes in
the network. A computer produces a table of shortest distances between any two different
nodes by repeatedly applying Dijkstra’s algorithm from each node of the network.
It takes the computer 0.082 seconds to produce a table of shortest distances for a network
of 10 nodes.
(b) Calculate approximately how long it will take, in seconds, for the computer to
produce a table of shortest distances for a network with 200 nodes. You must give a
reason for your answer.
(3)
(c) Explain why your answer to part (b) can only be an approximation.
(1)
(Total for Question 6 is 10 marks)
Question text
4. (a)
Initial time matrix
Initial route matrix
A
B
C
D
E
F
A
B
C
D
E
F
A
A
B
C
D
E
F
A
B
A
B
C
D
E
F
B
C
A
B
C
D
E
F
C
D
A
B
C
D
E
F
D
E
A
B
C
D
E
F
E
F
A
B
C
D
E
F
F
(b) 1st iteration
Time matrix
Route matrix
A
B
C
D
E
F
A
B
C
D
E
F
A
A
B
B
C
C
D
D
E
E
F
F
Question 4 continued
(Total for Question 4 is 8 marks)
Question text
7. The points P(9p 2 , 18p) and Q(9q 2 , 18q) , p ≠ q , lie on the parabola C with equation
y 2 = 36x
The line l passes through the points P and Q
(a) Show that an equation for the line l is
( p + q) y = 2(x + 9pq)
(3)
The normal to C at P and the normal to C at Q meet at the point A.
(b) Show that the coordinates of A are
( 9( p 2 + q 2 + pq + 2) , −9pq( p + q) )
(7)
Given that the points P and Q vary such that l always passes through the point (12, 0)
(c) find, in the form y 2 = f ( x ) , an equation for the locus of A, giving f ( x ) in simplest
form.
(4)
Question 7 continued
Question 7 continued
Question 7 continued
(Total for Question 7 is 14 marks)
Question text
1. The table below shows the lengths, in km, of the roads in a network connecting seven towns,
A, B, C, D, E, F and G.
A
B
C
D
E
F
G
A
–
24
–
22
35
–
–
B
24
–
25
27
–
–
–
C
–
25
–
33
31
36
26
D
22
27
33
–
–
42
–
E
35
–
31
–
–
37
29
F
–
–
36
42
37
–
40
G
–
–
26
–
29
40
–
(a) By adding the arcs from vertex D along with their weights, complete the drawing of
the network on Diagram 1 in the answer book.
(2)
(b) Use Kruskal’s algorithm to find a minimum spanning tree for the network. You
should list the arcs in the order that you consider them. In each case, state whether
you are adding the arc to your minimum spanning tree.
(3)
(c) State the weight of the minimum spanning tree.
(1)
(Total for Question 1 is 6 marks)
Question text
3.
A
8
B
4
3
C
7
10
6
1
1
D
E
Figure 2
Direct roads between five villages, A, B, C, D and E, are shown in Figure 2. The weight
on each arc is the time, in minutes, it takes to travel along the corresponding road. The
road from D to C is one-way as indicated by the arrow on the corresponding arc.
Floyd’s algorithm is to be used to find the complete network of shortest times between
the five villages.
(a) Set up initial time and route matrices.
(2)
The matrices after two iterations of Floyd’s algorithm are shown below.
Time matrix
Route matrix
A
B
C
D
E
A
B
C
D
E
A
A
–
8
4
7
18
A
B
C
D
B
B
B
8
–
3
15
10
A
B
C
A
E
C
C
4
3
–
11
6
A
B
C
A
E
D
D
7
15
1
–
1
A
A
C
D
E
E
– E
18
10
6
1
B
B
C
D
E
(b) Perform the next two iterations of Floyd’s algorithm that follow from the tables
above. You should show the time and route matrices after each iteration.
(4)
The final time matrix after completion of Floyd’s algorithm is shown below.
Final time matrix
A
B
C
D
E
A
–
7
4
7
8
B
7
–
3
10
9
C
4
3
–
7
6
D
5
4
1
–
1
E
6
5
2
1
–
(c) (i) Use the nearest neighbour algorithm, starting at A, to find a Hamiltonian cycle in
the complete network of shortest times.
(ii) Find the time taken for this cycle.
(iii) Interpret the cycle in terms of the actual villages visited.
(3)
(Total for Question 3 is 9 marks)
Question text
5. The nine distinct numbers in the following list are to be packed into bins of size 50
23 17 19 x 24 8 18 10 21
When the first-fit bin packing algorithm is applied to the numbers in the list it results in
the following allocation.
Bin 1: 23 17 8
Bin 2: 19 x 10
Bin 3: 24 18
Bin 4: 21
(a) Explain why 13 < x < 21
(3)
The same list of numbers is to be sorted into descending order. A bubble sort, starting at
the left-hand end of the list, is to be used to obtain the sorted list. After the first complete
pass the list is
23 19 17 24 x 18 10 21 8
(b) Using this information, write down the smallest interval that must contain x, giving
your answer as an inequality.
(2)
When the first-fit decreasing bin packing algorithm is applied to the nine distinct
numbers it results in the following allocation.
Bin 1: 24 23
Bin 2: 21 19 10
Bin 3: 18 17 x
Bin 4: 8
Given that only one of the bins is full and that x is an integer,
(c) calculate the value of x. You must give reasons for your answer.
(2)
(Total for Question 5 is 7 marks)
Question text
6.
E
B
x
19
15
24
45
42
F
A
C
21
24
65
31
34
D
y
G
Figure 4
[The total weight of the network is 320 + x + y]
(a) State, with justification, whether the graph in Figure 4 is Eulerian, semi-Eulerian or neither.
(2)
The weights on the arcs in Figure 4 represent distances. The weight on arc EF is x where
12 < x < 26 and the weight on arc DG is y where 0 < y < 10
An inspection route of minimum length that traverses each arc at least once is found.
The inspection route starts and finishes at A and has a length of 409
It is also given that the length of the shortest route from F to G via A is 140
(b) Using appropriate algorithms, find the value of x and the value of y.
(9)
(Total for Question 6 is 11 marks)
Question text
3. (a)
Initial time matrix
Initial route matrix
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
(b)
Time matrix
Route matrix
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
Time matrix
Route matrix
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
If you make an error there are spare copies of these matrices on Page 9.
Question 3 continued
Question 3 continued
Question 3 continued
Only use these matrices if you have made an error in your working.
(a)
Spare copy of initial time matrix
Spare copy of initial route matrix
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
(b)
Spare copy of time matrix
Spare copy of route matrix
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
Spare copy of time matrix
Spare copy of route matrix
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
(Total for Question 3 is 9 marks)
Question text
1.
2.1
1.7
3.0
1.9
3.2
1.2
3.3
1.4
1.5
0.2
(a) Use the first-fit bin packing algorithm to determine how the numbers listed above can
be packed into bins of size 5
(2)
The list of numbers is now to be sorted into descending order.
(b) Perform a quick sort on the original list to obtain the sorted list. You should show the
result of each pass and identify your pivots clearly.
(4)
For a list of n numbers, the quick sort algorithm has, on average, order n log n.
Given that it takes 2.32 seconds to run the algorithm when n = 450
(c) calculate approximately how long it will take, to the nearest tenth of a second, to run
the algorithm when n = 11 250. You should make your method and working clear.
(2)
(Total for Question 1 is 8 marks)
Question text
2.
D
42
B
E
15
38
10
17
C
75
10
A
14
J
7
G
20
12
23
42
6
F
39
H
Figure 1
[The total weight of the network is 370]
Figure 1 represents a network of corridors in a building. The number on each arc
represents the length, in metres, of the corresponding corridor.
(a) Use Dijkstra’s algorithm to find the shortest path from A to D, stating the path and
its length.
(6)
On a particular day, Naasir needs to check the paintwork along each corridor. Naasir
must find a route of minimum length. It must traverse each corridor at least once,
starting at B and finishing at G.
(b) Use an appropriate algorithm to find the arcs that will need to be traversed twice.
You must make your method and working clear.
(4)
(c) Find the length of Naasir’s route.
(1)
On a different day, all the corridors that start or finish at B are closed for redecorating.
Naasir needs to check all the remaining corridors and may now start at any vertex and
finish at any vertex. A route is required that excludes all those corridors that start or
finish at B.
(d) (i) Determine the possible starting and finishing points so that the length of Naasir’s
route is minimised. You must give reasons for your answer.
(ii) Find the length of Naasir’s new route.
(3)
(Total for Question 2 is 14 marks)
Question text
3.
B
15
5
7
C
A
4
18
D
9
3
3
E
Figure 2
The network in Figure 2 shows the direct roads linking five villages, A, B, C, D and E.
The number on each arc represents the length, in miles, of the corresponding road.
The roads from A to E and from C to B are one-way, as indicated by the arrows.
(a) Complete the initial distance and route tables for the network provided in the answer book.
(2)
(b) Perform the first three iterations of Floyd’s algorithm. You should show the distance
table and the route table after each of the three iterations.
(5)
After five iterations of Floyd’s algorithm the final distance table and partially completed
final route table are shown below.
Distance table
Route table
A
B
C
D
E
A
B
C
D
E
A
A
–
12
7
6
3
A
B
B
15
–
22
21
18
A
B
C
C
7
5
–
4
7
A
B
C
D
D
11
9
4
–
3
C
C
C
D
E
E
14
12
7
3
–
D
D
D
D
E
(c) (i) Explain how the partially completed final route table can be used to find the shortest
route from E to A.
(ii) State this route.
(3)
Mabintou decides to use the distance table to try to find the shortest cycle that passes through each
vertex. Starting at D, she applies the nearest neighbour algorithm to the final distance table.
(d) (i) State the cycle obtained using the nearest neighbour algorithm.
(ii) State the length of this cycle.
(iii) Interpret the cycle in terms of the actual villages visited.
(iv) Prove that Mabintou’s cycle is not optimal.
(4)
(Total for Question 3 is 14 marks)
Question text
2.
Length of shortest path from A to D:
Shortest path from A to D:
6
J
10
H
14
23
17
D
39
G
10
42
E
12
7
15
20
C
F
B
75
42
38
value
Final
Working values
labelling
Order of
A
Vertex
Key:
Question 2 continued
D
42
B
E
15
38
10
17
C
75
10
A
14
J
7
G
20
12
23
42
6
F
39
H
Figure 1
Question 2 continued
Question 2 continued
(Total for Question 2 is 14 marks)
Question text
3. (a)
Initial distance table
Initial route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
(b) 1st iteration
Distance table
Route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
2nd iteration
Distance table
Route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
3rd iteration
Distance table
Route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
Turn to page 11 for spare copies of these tables if you need to correct your work.
Question 3 continued
Question 3 continued
Question 3 continued
Only use these tables if you need to correct your work.
(a)
Initial distance table
Initial route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
(b) 1st iteration
Distance table
Route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
2nd iteration
Distance table
Route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
3rd iteration
Distance table
Route table
A
B
C
D
E
A
B
C
D
E
A
A
B
B
C
C
D
D
E
E
(Total for Question 3 is 14 marks)