On which map does the run cross off the most roads? A>B means a road from A to B.
the answer, and why
the answer is A
It has no loop, so each of its 5 roads is crossed off once.
if you chose another
BThree roads, each crossed off once.
CFour roads on a ring. No place is free, so it crosses off 0.
DOne road.
pen and paper
5question 5about 8 minutes
The map has one-way roads A to E, A to B, E to F, B to F, B to C, F to G and C to G.
Write the count at each place.
Run the method, places freed by the same place joining in letter order. What is the order?
How many roads are crossed off, and how many places taken?
a hint
Keep the queue in a line as you go, and cross off each road.
a worked answer
The counts are A 0, B 1, C 1, E 1, F 2 and G 2. A takes 1, and B and E join. B takes 2: C joins, and F still has 1. E takes 3, and F joins. C takes 4, and G still has 1. F takes 5, and G joins. G takes 6. So A, B, E, C, F, G. Each of the 7 roads is crossed off once, and all 6 places are taken.
The map has one-way roads A to B, B to C, C to G, G to F, F to B and G to H.
Run the method. Which places get a number, and what do the others have written?
Walk back from H along roads not crossed off. Which place comes twice, and what is the loop?
Take out the road from F to B and run it again, places freed by the same place joining in letter order. What is the order?
a hint
Draw the map first, and mark each road you cross off.
a worked answer
A takes 1 and crosses off A to B, and the queue empties. B, C, F, G and H are not taken, with 1 written at each. Walking back from H goes G, C, B, F, then G again. So the loop is G to F, F to B, B to C and C to G, and H sits after it. With F to B out, the run gives the order A, B, C, G, F, H.
The whole map. The loop, heavy, holds B, C, F and G.
Question 2: why does a run number every place, on a map with no loop? Let be how many it numbers.5 of 5 shown
1the move: when the queue empties
the line:
why it is allowed: Suppose the queue is empty and places are not taken. Each still has a count above 0, or it would have joined. A road from a place taken was crossed off, so a road not crossed off comes from a place not taken.
2the move: walk back
the line:
why it is allowed: Start at a place not taken and go backwards along a road not crossed off. By line 1 you reach another place not taken, which has such a road too, so the walk never has to stop.
guess it, then
3the move: a place comes twice
the line:
A is taken, shaded, and the queue empties. Walk back from C: B, E, F, then B again. Read forwards, B to F, F to E and E to B, heavy, is a loop, and C sits after it.
why it is allowed: There are only places, so a walk that never stops comes back to one. The roads between its two visits make a loop, and the place you started from sits on it or after it.
guess it, then
4the move: no loop, none left
the line:
why it is allowed: With no loop, by line 3 every place is taken, all . Each crosses off all its roads, so every road is crossed off. For 5 places, 5.
guess it, then
5the move: a loop, no order
the line:
why it is allowed: Round any loop, as here, an order would need B before F, F before E and E before B, so B before itself. So stopping is the right answer, and places not taken mean a loop.
guess it, then
try it with a small : at , line 4 gives , which you can work out by hand