D1: Shortest paths (Dijkstra's and Floyd's algorithms) – Edexcel IAL Decision Mathematics (WDM1)
Question text
3.
H
F
40
C
20
33
14
17
24
9
48
5
12
E
G
B
22
I
15
81
34
D
51
18
J
46
A
Figure 2
[The total length of the network is 489]
Figure 2 represents a network of cycle paths between ten locations, A, B, C. D, E, F,
G, H, I and J. The number on each arc is the time, in minutes, to cycle between the
corresponding locations.
(a) State, with a reason, whether the network is Eulerian, semi‑Eulerian or neither.
(1)
(b) (i) Use Dijkstra’s algorithm to determine the shortest time to cycle from A to H
(ii) State the quickest cycle route from A to H
(6)
The paths from A to B, A to J and B to C become blocked and cannot be used.
(c) Determine the increase in the shortest time to cycle from A to H. You must justify
your answer.
(2)
(Total for Question 3 is 9 marks)
Question text
4.
A
B
C
D
E
F
G
H
A
–
34
42
29
36
43
28
6x + 7
B
34
–
27
40
28
51
43
8x – 2
C
42
27
–
31
41
37
32
46
D
29
40
31
–
25
34
43
39
E
36
28
41
25
–
30
38
52
F
43
51
37
34
30
–
31
48
G
28
43
32
43
38
31
–
34
H
6x + 7
8x – 2
46
39
52
48
34
–
The table shows the shortest distances, in miles, between eight towns, A, B, C, D, E, F,
G and H, where x is an unknown positive integer.
Raphael wants to visit all eight towns and needs to find a route that minimises the total
distance travelled returning to the starting point.
An initial upper bound for the length of Raphael’s route, obtained using the nearest
neighbour algorithm starting at H, is 256 miles. This nearest neighbour route starts with
arc HG.
(a) Use the nearest neighbour algorithm starting at A, to obtain an expression for a
second upper bound for the length of Raphael’s route. You must state the route and
its length in terms of x.
(3)
Given that the upper bound obtained by starting at A is better than the initial
upper bound,
(b) use the answer to part (a) to calculate the value of x
(3)
(c) By deleting A and all its arcs, obtain a lower bound for the length of
Raphael’s route.
(3)
(d) Write down the smallest interval that must contain the length of Raphael’s route.
(1)
(Total for Question 4 is 10 marks)
Question text
4.
B
24
J
15
A
42
55
55
18
27
47
26
36
G
C
I
35
D
28
15
13
11
18
F
39
38
H
E
Figure 2
Figure 2 represents the cycle paths between ten towns, A, B, C, D, E, F, G, H, I and J.
The number on each arc is the time, in minutes, to cycle between the towns. Munira
must cycle from I to C travelling via A.
(a) Explain how Dijkstra’s algorithm can be used to find the quickest route from I to C
travelling via A.
(2)
(b) (i) Use Dijkstra’s algorithm to find the quickest route from I to C via A.
(ii) State the length of this quickest route.
(6)
(Total for Question 4 is 8 marks)
Question text
2.
I
B
17
8
7
7
A
6
4
J
21
15
22
9
D
12
12
12
C
5
8
H
9
8
10
28
F
17
14
16
K
E
16
25
G
Figure 1
Figure 1 shows a network of paths between eleven viewing points in a bird sanctuary.
The number on each arc represents the time taken, in minutes, to walk between the
viewing points.
Use Dijkstra’s algorithm to determine the quickest route from C to K. You should state
the route and the quickest time.
(Total for Question 2 is 6 marks)
Question text
3.
B
C
E
10
4
7
J
3
8
4
4
13
A
10
F
7
8
5
4
4
H
D
G
9
Figure 2
[The total weight of the network is 100]
Figure 2 represents a network of pipes in a building. The number on each arc represents
the length, in metres, of the corresponding pipe.
(a) Use Dijkstra’s algorithm to find the shortest path from A to J. State your path and
its length.
(6)
On a particular day Kim needs to check each pipe. A route of minimum length, which
traverses each pipe at least once and starts and finishes at A, needs to be found.
(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) Write down a possible route, giving its length.
(2)
All the pipes directly attached to B are removed. Kim needs to check all the remaining
pipes and may now start at any vertex and finish at any vertex. A route is required that
excludes all those pipes directly attached to B.
(d) State all possible combinations of starting and finishing points so that the length of
Kim’s route is minimised. State the length of Kim’s route.
(3)
(Total for Question 3 is 15 marks)
Question text
4:
E
B
9
32
18
18
8
7
H
A
9
22
C
28
F
5
17
23
12
14
9
J
6
D
22
G
Figure 1
Figure 1 represents a network of roads between nine villages, A, B, C, D, E, F, G,
H and J. The number on each arc is the time taken, in minutes, to drive along the
corresponding road.
Liliya must drive from village A to village H.
(a) (i) Use Dijkstra’s algorithm to determine the fastest route from A to H.
(ii) State the fastest time.
(6)
The roads EF and GJ are now closed for maintenance.
(b) Calculate how much more time Liliya’s drive will now take.
(2)
(Total for Question 4 is 8 marks)
Question text
2.
B
F
147
203
84
91
70
77
56
E
182
84
133
A
C
J
G
98
84
56
175
42
224
154
D
H
Figure 1
[The total weight of the network is 1960 m]
The network shown in Figure 1 represents the paths between nine attractions in a
theme park.
The number on each edge is the length, in metres, of the corresponding path.
(a) (i) Use Dijkstra’s algorithm to find the shortest path from A to J.
(ii) State the length of the shortest path from A to J in metres.
(6)
Sarita needs to inspect the paths between the attractions. She must travel along each
path at least once.
Sarita decides to start and finish her inspection route at A. She wishes to minimise the
length of her route.
(b) By considering the pairings of all relevant nodes, find the length of Sarita’s route.
(4)
Sarita now decides to start her inspection route at A, but finish at a different attraction.
She must still minimise the length of her route and travel along each path at least once.
(c) (i) Determine where Sarita should finish her route. You must justify your answer.
(ii) Calculate the difference between the lengths of the two inspection routes.
(3)
(Total for Question 2 is 13 marks)
Question text
6
H
2
J
23
Shortest path:
Length of shortest path:
33
40
G
15
5
F
E
34
10
29
27
22
C
8
12
value
Final
D
25
B
Working values
labelling
Order of
13
11
Key:
Vertex
A
6.
Question 6 continued
Question 6 continued
(Total for Question 6 is 13 marks)
Question text
2.
E
5
8
H
C
13
17
3
A
1
0
B
11
4
30
10
8
J
G
5
D
16
8
1
3
21
F
30
Key:
Order of
Final
Vertex
labelling
value
Working values
Shortest path from A to J:
Length of shortest path from A to J:
Question 2 continued
E
8
5
H
C
13
3
17
A
4
11
B
30
10
8
8
G
J
5
16
3
D
1
21
30
F
Figure 1
[The total weight of the network is 193]
Question 2 continued
Question 2 continued
(Total for Question 2 is 16 marks)
Question text
6.
30
G
B
E
21
21
x
10
34
8
35
43
H
J
24
C
A
16
35
52
11
12
31
F
D
Figure 4
[The total weight of the network is 383 + x]
Figure 4 models a network of roads. The number on each edge gives the time,
in minutes, to travel along the corresponding road. The vertices, A, B, C, D, E, F, G,
H and J represent nine towns. Ezra wishes to travel from A to H as fast as possible.
The time taken to travel between towns G and J is unknown and is denoted by
x minutes.
Dijkstra’s algorithm is to be used to find the fastest time to travel from A to H. On
Diagram 1 in the answer book the “Order of labelling” and “Final value” at A and J, and
the “Working values” at J, have already been completed.
(a) Use Dijkstra’s algorithm to find the fastest time to travel from A to H. State the
quickest route.
(6)
Ezra needs to travel along each road to check it is in good repair. He wishes to minimise
the total time required to traverse the network. Ezra plans to start and finish his
inspection route at A. It is given that his route will take at least 440 minutes.
(b) Use the route inspection algorithm and the completed Diagram 1 to find the range of
possible values of x.
(6)
(c) Write down a possible route for Ezra.
(1)
A new direct road from D to H is under construction and will take 25 minutes to travel
along. Ezra will include this new road in a minimum length inspection route starting and
finishing at A. It is given that this inspection route takes exactly 488 minutes.
(d) Determine the value of x. You must give reasons for your answer.
(2)
(Total for Question 6 is 15 marks)
Question text
1.
(a) Explain what is meant by the term ‘path’.
(2)
E
B
13
8
5
23
5
16
F
H
A
15
9
5
C
10
17
7
27
19
9
6
J
15
G
D
Figure 1
Figure 1 represents a network of roads. The number on each arc represents the length, in km, of the
corresponding road. Piatrice wishes to travel from A to J.
(b) Use Dijkstra’s algorithm to find the shortest path Piatrice could take from A to J.
State your path and its length.
(6)
Piatrice needs to return from J to A via G.
(c) Find the shortest path Piatrice could take from J to A via G and state its length.
(2)
(Total 10 marks)