## Brain-Teaser 489

**From The Sunday Times, 11th October 1970** [link]

The All-Go railway runs from Alby to Goby over 20 miles away. Let us say it goes from A to G, and on the way you stop at B, C, D, E and F in that order.

All the distances between stops are different from one another and all are less than 8 miles, yet it is possible to make journeys of 1 mile, 2 miles, 3 miles and so on up to 18 miles by picking the right stations.

The distance from A to B is less than the distance from F to G.

How many miles from A are B, C, D, E, F and G?

[teaser489]

## Jim Randell 12:15 pm

on25 July 2019 Permalink |(See also:

Teaser 1986).This Python program runs in 220ms.

Run:[ @repl.it ]Solution:The distances (in miles) are: A→B=2, A→C=7, A→D=14, A→E=15, A→F=18, A→G=24.The distances between stations are:

So as well as being able to make all the distances from 1 to 18, we can also make distances of 22 (B to G) and 24 (A to G).

LikeLike