AWith every pair joined, grows like , so the heap's ceiling grows faster.
CThe end settled second skips the road, so each road is looked along at most once.
DThat is a line's count. Settling every place here weighs up more, from 3 places on.
4question 4
The search runs from the first place after the semicolon to the second. On which map does it weigh up the most places?
the answer, and why
the answer is C
Settling A writes a distance at all 3 others, so 1, then 3, 2 and 1, which is 7.
if you chose another
AA line of 4 weighs up one place each round, 4.
BH is on another part of the map, so the run ends after A and B, 2.
DB is nearest and is the place to reach, so the run stops after A, then B and E, 3.
pen and paper
5question 5about 8 minutes
The map has roads A-B 6, A-E 1, E-F 2, B-F 1, B-C 3, F-G 6 and C-G 1. The search runs from A to G.
Write each place and its distance, in the order settled.
Which distances are written and later beaten?
What is the shortest way?
a hint
Write every distance down, and cross it out when a shorter one comes.
a worked answer
In the order settled: A 0, E 1, F 3, B 4, C 7, G 8. B's 6 becomes 4, and G's 9 becomes 8. The shortest way is A, E, F, B, C, G, which is 1 + 2 + 1 + 3 + 1, so 8.
Four roads run one way, and the search starts at A. A to E is 7, A to B is 8, B to C is 2, and C to E is 4 below 0.
Run on until every place is settled. What does the search say E is, and what is the shortest?
When C is settled, why does E not change?
Make C to E 0 instead. What does the search say E is now, and is it right?
a hint
Look along a road only to a place not settled yet.
a worked answer
Settling A writes E 7 and B 8, so E is settled at 7. B is settled at 8 and writes C 10. C is settled at 10. Through it, E would be 6, but E is settled, so it says 7, and the shortest is 6. With C to E at 0, through C is 10, so it says 7, and now 7 is the shortest.
The four one-way roads. Their lengths are in the question.
Question 7: why does one length below 0 break it?5 of 5 shown
1the move: a length below 0
the line:
The shortest way to B, drawn heavy, A, C, E, B.
one-way road
length
A to B
6
A to C
7
C to E
3
E to B
A to B alone is 6. A, C, E, B is 7 plus 3 plus , which is 5.
why it is allowed: These roads run one way. On a two-way road below 0 you could go back and forth, shorter each time, so no way would be shortest.
2the move: the nearer place settled first
the line:
why it is allowed: Search from A to B. Settling A writes B 6 and C 7. B is nearer, so round 2 settles it at 6, and the run stops.
guess it, then
3the move: the way round
the line:
why it is allowed: is the way A, C, E, B. It is 7 up to C, then less, what the rest of the way takes off. Here is 2, as C to E adds 3 and E to B takes off 5.
guess it, then
4the move: wrong, with no warning
the line:
why it is allowed: By lines 2 and 3. Running on past B would not help, as a settled place gets no new distance. The answer looks like any other, and nothing says it is wrong.
guess it, then
5the move: which line failed
the line:
why it is allowed: Line 6 of question 6 says the whole way is at least the way up to . Here is C. The way up to C is 7, and the whole way is 5.
guess it, then
try it with a small : at , line 3 gives , which you can work out by hand