### 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,282 hits

Programming Enigma Puzzles

18 March 2015

Posted by on **From New Scientist #1413, 7th June 1984** [link]

The dots are very thin vertical trees, laid out on an endless square grid, with each tree a kilometre from its nearest neighbours. The two circles are Sue’s first attempts at drawing the smallest and the largest possible circles which enclose exactly 12 trees. The smaller has a radius of 1803 metres, the larger of 2061 metres. Given that the centres can be anywhere you like, that the radius must be an exact whole number of metres, and that the circles must not pass through any tree, can you do better? What in fact is:

(a) the smallest possible radius?

(b) the largest possible radius?for such a circle enclosing exactly 12 trees?

[enigma266]

Advertisements

%d bloggers like this:

This is another Lattice Circle problem – like

Enigma 136andEnigma 229(also by Stephen Ainley).I adapted my lattice circle solver for this problem. It runs in 796ms.

Solution:(a) The smallest possible radius is 1582m. (b) The largest possible radius is 2124m.Here is a diagram of a circle with the smallest possible radius, the circle is centred 500m north and 500m east of a tree:

Here is a diagram of a circle with the largest possible radius, the circle is centred 0m north and 125m east of a tree:

I avoided a lot of code by experimenting to find the positions that minimised and maximised the number of points in the circle. I don’t know yet whether it is an error in my code but my maximum circle is 2125m rather than 2124m

The maximum circle with a radius of 2125m would hit exactly three of the thin trees on the perimeter of the fence. (In my diagram they are the black dots that touch the outside of the circle). So you reduce the radius to avoid that, but it has to be an exact number of metres, so the answer is 2124m.

Thanks. My code is fine but I missed a clause in the question.