### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,149)
- misc (2)
- project euler (2)
- puzzle (38)
- site news (44)
- tantalizer (40)
- teaser (3)

### Site Stats

- 175,242 hits

Advertisements

Programming Enigma Puzzles

22 February 2016

Posted by on **From New Scientist #2335, 23rd March 2002** [link]

My square courtyard garden, of less than 100m², occupies a whole number of square metres. I marked out my octagonal pool in the middle of the garden by running lines from each corner of the square to the mid-points of the two sides opposing that corner. The perimeter of the octagon is a whole number of metres.

What is the area of my courtyard garden?

What is the perimeter of my octagonal pool?

[enigma1179]

Advertisements

%d bloggers like this:

If we consider one quadrant of the square divided into a grid of 6×6 squares, we see that the area of the octagon is 6/36 = 1/6 the area of the square. We also see that each side of the octagon is √5 times the side of one of the small squares in the grid.

If the large square has area

Athen the perimeter of the octagon isp = (2/3)(√5)(√A).So:

p²= 20A/9It follows that

Amust be a multiple of 9. So there are only 11 candidates forA.If

A= 9n(n=1 to 11), thenp²= 20n, so 20nmust be a perfect square.We can examine the possibilities by hand (I think it’s pretty obvious what

nmust be for 20nto be a square number), or this Python program runs in 34ms.Solution:The area of the courtyard garden is 45m². The perimeter of the octagonal pool is 10m.