- 310,316 hits
Programming Enigma Puzzles
The mileage chart shows the distances between various secret government establishments, each of which is designated by a three-digit code. The distance between two locations can be calculated by adding the differences between the three pairs of corresponding digits, ignoring the signs of the differences. Thus the distance between 689 and 773 is (7 − 6) + (8 − 7) + (9 − 3) = 8.
For reasons of security the government wants these locations to be as far apart as possible, and is concerned that two of them are only four miles apart. Locations 000 and 999 must be retained, but the other four can be moved to locations represented by any three-digit codes, to make the closest pair as far apart as possible.
What is the greatest possible distance between the closest pair?