### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,123)
- misc (2)
- project euler (2)
- puzzle (31)
- site news (43)
- tantalizer (31)
- teaser (3)

### Site Stats

- 168,355 hits

Programming Enigma Puzzles

24 July 2017

Posted by on **From New Scientist #2261, 21st October 2000** [link]

Take a large sheet of paper and a black pen and draw a rectangle ABCD with AB = 10 metres and BC = 2 metres. Now draw lines to divide your rectangle into small squares, each of side 1 centimetre. Place your diagram so that A is due north of D and B is east of A. In each small square draw the diagonal that goes from northwest to southeast. Let P and Q be the mid-points of AD and BC, respectively. Then there is a black line PQ; remove it and replace it by a red line.

Amber is a small ant who can walk along the black lines in your diagram. North of PQ she covers a centimetre in 1 minute, but south of PQ she can cover a centimetre in 30 seconds. She is to walk from C to A and she chooses the quickest route.

1.How long does Amber take on her journey? Give the time, to the nearest second, in hours, minutes and seconds.Ben is another ant who walks along the black lines. North of PQ he goes at the same speed as Amber, but not south of PQ. The fastest time for Ben to get from C to A is 24 hours.

2.South of PQ, how long does Ben take to cover a centimetre? Give the time, to the nearest second, in minutes and seconds.

[enigma1105]

Advertisements

%d bloggers like this:

This Python program uses the

find_value()routine from theenigma.pyto find a numerical answer to the second part of the puzzle. It runs in 196ms.Solution:1. Amber’s journey takes 10h 12m 8s; 2. Ben takes 3m 59s to cover 1cm in the Southern part of the grid. (Times to the nearest second).Here are minimal duration paths for Amber and Ben:

Amber covers (100√2) cm in the Northern section [3], and ((100√2) + 800) cm in the Southern section [2] + [1], giving an overall time of (24000 + 9000√2) seconds.

Ben covers (900 + 100√2) cm in the Northern section [3] + [2], and 100 cm in the Southern section [1], for an overall time of 86400 s, giving a time

tto cover 1cm in the Southern section of:I think I’m right in saying that there are only these two basic patterns of quickest route (with their rotations by 180°, depending as the ant is faster in the northern or southern band).

Type A flips to type B when the ratio of the two speeds exceeds 1 + √2.

Of course where a band contains both horizontal and diagonal segments (red for Amber, blue for Ben), there are numerous possible zigzag routes with the two directions alternating. But the overall distances covered in each direction remain the same.