# Sunday Times Teaser 2728 – Garden Design

*by Ian Kay*

#### Published: 4 January 2015 (link)

I have a square garden with sides a whole number of metres in length. It is surrounded by a fence with posts at the corners and then at one metre intervals. I wish to make the garden into four triangular beds surrounding a lawn that has four sides of different lengths. To mark out the lawn I choose one post on each of the sides of the garden and I stretch a length of string around those four posts. I can create my lawn in various ways but the length of string needed is always one of two possible values. I have chosen one arrangement using the smaller of the two lengths.

What is the area of my lawn?

6 Comments
Leave one →

I tried generating answers. Eg split north side 17/21 split west side 8/30 south side 30/8 and east side 20/18

Following the same numbering system 24/6 26/4 21/9 22/8 seems to fit.

As does 30/4 25/9 28/6 19/15 and many others.

However all my possible answers result in different string lengths (above it would be 111, 97 and 108 respectively)

Obviously I’m missing something but can’t see what.

Hi Andrew, Welcome to my site! The key here is to realise that unless the garden is small, many different string lengths will inevitably occur. So the trick is to find a garden size that is so small that only two different length strings are possible.

Thanks for your advice.

It might interest you (or very possibly not) that when I first used math.sqrt to calculate the length of the string I ended up with 3 possible values for a 4m garden but not when I used **0.5.

Thought the two operations were identical!?

Anyway thanks for your help and I enjoyed your website.

Unfortunately they are not identical and, typically, each will only give an answer accurate to about 15 decimal digits. To avoid this problem in my code above, I rounded the answers to eight digits before testing them for equality.

Ah ha, that’s what the round command means.

I should explain that I am trying to teach myself Python and am using these teasers as interesting exercises. Hence my ignorance.

I’m doing the ONE+ONE=TWO puzzle at the moment.