AOnly the line in letter order. Backwards looks along .
BIt needs 2. Round 1 writes every place.
DA last pass writes no distance. It only looks for a road that can still make a way shorter.
4question 4
On which map does the run look along the most roads? A>B 1 means a road from A to B, 1 long, and the letter after the semicolon is the start.
the answer, and why
the answer is A
Its loop B, C, G adds up to 3 below 0, so every round changes something. That is 3 rounds and the last pass, 4 roads each, so 16 looks. The others cost 6, 9 and 2.
if you chose another
BTwo rounds of 3 roads, so 6.
COne road, then 2, then 3, then the last pass's 3, so 9.
DRound 1 and the last pass, 1 road each, so 2.
pen and paper
5question 5about 8 minutes
The map has one-way roads A to B 3, A to E 1, E to F 2, B to C 2 and F to G 4. F to B is 3 below 0. Start at A.
Look along the roads in letter order, and write every distance after each round.
How many rounds does the run take, and how many roads does it look along?
Which road gives B its shortest way, and by how much does it beat A to B?
a hint
Keep a row of distances for each round, and change a number only when a way beats it.
a worked answer
Round 1: A to B writes 3 at B, A to E writes 1, B to C writes 5 and E to F writes 3. F to B makes B 0, and F to G writes 7. So after round 1: A 0, B 0, C 5, E 1, F 3, G 7. Round 2 carries B's 0 on to C, which becomes 2. Round 3 makes nothing shorter, so the run stops after 3 rounds, with 6 roads looked along in each, 18 in all. F to B gives B its shortest way, 0 against the 3 of A to B, so 3 shorter.
Round 1: A 0, B 0, C 5, E 1, F 3, G 7. Round 2: C 2. Round 3: no change.
3 rounds, 18 roads.
F to B, 3 shorter.
6question 6about 8 minutes
The map has one-way roads A to B 3, A to E 2, B to C 1, G to F 1, F to B 1 and G to H 1. C to G is 6 below 0. Start at A.
Add up the loop B, C, G, F. What does each lap do?
After round 6 the distances are A 0, B -6, C -2, E 2, F -7, G -8 and H -7. Which road on the loop still makes a way shorter on the last pass?
Which places get , and which keep their distance?
a hint
Draw the map first, and mark the loop.
a worked answer
The loop adds up to 1 - 6 + 1 + 1, which is -3, so each lap is 3 shorter. On the last pass B to C gives -6 + 1, which is -5, beating C's -2. C to G gives -8, G to F gives -7 and F to B gives -6, none shorter. So B, C, F and G get , and so does H, past the loop. A keeps 0 and E keeps 2.
The whole map. The loop, drawn heavy, holds B, C, G and F.
Question 6: what does such a loop do, and how does the last pass find it? Let be the rounds before that pass.5 of 5 shown
1the move: no shortest way
the line:
The loop B, C, F, drawn heavy, adds up to 2 below 0, so each lap is 2 shorter. G is past it.
after
A
B
C
F
G
round 1
0
2
6
1
4
round 2
0
0
4
-1
2
round 3
0
-2
2
-3
0
round 4
0
-4
0
-5
-2
Each round, each place from B on is 2 lower, one lap's worth.
why it is allowed: Such a loop is one the start can reach, adding up below 0. Go round it once more and a way through it is shorter, as often as you like. So a place it can reach has no shortest way.
2the move: no such loop
the line:
why it is allowed: By question 2 each place the start reaches is right after round , and by its line 1 no distance goes lower. So no road can make a way shorter.
guess it, then
3the move: such a loop
the line:
road
way along it
written at its far end
shorter?
B to C
-4 + 2 is -2
0
yes
C to F
0 - 5 is -5
-5
no
F to B
-5 + 1 is -4
-4
no
The last pass on the loop, after round 4. B to C still makes a way shorter. A last pass writes no distance, so C keeps its 0 for the next row.
why it is allowed: Say each place on it has a distance, and no road on it makes a way shorter. Then each far end is at most its near end plus the road's length. With each letter for its place's distance, on this map C is at most B + 2, F at most C - 5, and B at most F + 1. Add the three, and B + C + F is at most itself take away 2, so 0 is at most -2. That is false. On any such loop the distances cancel the same way, leaving 0 at most its total, which is below 0. So some road on it makes a way shorter.
guess it, then
4the move: all the rounds
the line:
why it is allowed: Line 1's table shows it, as all 4 rounds change something. Now any such loop. Say a round changed nothing. Then every road from a place with a distance already has a distance at its far end, so each place on the loop has one. By line 3 a road on the loop then makes a way shorter, so that round did change something. So the run uses all rounds. With repeats cut out, a way to a place on the loop has at most roads, and each round writes a distance at least one road further. So by round each place on it has one. For 5 places, 4.
guess it, then
5the move: every place past it
the line:
why it is allowed: Take a place no such loop reaches. A way to it never passes such a loop, or that loop would reach it. So question 2's steps hold along that way, and the place is right. The near end of a road into it is also a place no such loop reaches, or the loop would reach it along that road. So that end is right too, and the road cannot beat what is written. So a road that still makes a way shorter ends at a place such a loop reaches, and by line 3 one ends on each such loop. The run writes there and at every place it leads on to, and nowhere else. Here that is B, C, F and G, and A keeps 0.
guess it, then
try it with a small : at , line 4 gives , which you can work out by hand