# Enigmatic Code

Programming Enigma Puzzles

## Enigma 1172: Plant a tree

From New Scientist #2328, 2nd February 2002 [link]

George’s local council celebrated National Plant a Tree Year by planting four saplings in a public park. Unfortunately, a few nights later, vandals dug up one of the trees and cleared the ground leaving no evidence of where the tree had been. George has been asked to help.

The Mayor explained that the straight-line between the six pairs of trees had been carefully measured so that there were only two different distances. With three trees remaining where they had been planted, he asked it George could work out the original position of the fourth.

“No,” George replied, “I have identified four possible positions and I am still thinking”.

How many possible positions were there?

[enigma1172]

### 4 responses to “Enigma 1172: Plant a tree”

1. Jim Randell 11 April 2016 at 8:39 am

I didn’t solve this one by programming (although I did write a program to draw the diagrams).

Here is my analysis:

There are three trees remaining. Label them A, B, C and the missing tree is D.

Measure the distances AB, AC, BC. We use units such that AB = 1.

There are only two distances involved, 1 and d.

Case 1: If (AB, AC, BC) = (1, 1, 1) then the remaining trees form an equilateral triangle and the missing tree is a distance d from at least one of them:

Case 1.1: If (AD, BD, CD) = (d, d, d), then D is at the centroid of the triangle, d = 1/√3.

Case 1.2: If (AD, BD, CD) = (1, d, d), then D is on the intersection of the unit circle centred on A, and the perpendicular bisector of BC. So there are two possible positions for D, with d = √(2 − √3) or d = √(2 + √3).

Case 1.3: If (AD, BD, CD) = (d, 1, d). The same reasoning as 1.2 identifies two possible positions for D.

Case 1.4: If (AD, BD, CD) = (d, d, 1). The same reasoning as 1.2 identifies two possible positions for D.

Case 1.5: If (AD, BD, CD) = (1, 1, d), then D is on the intersection of the unit circles centred on A and B that isn’t C. d = √3.

Case 1.6: If (AD, BD, CD) = (1, d, 1). The same reasoning as 1.5 identifies the position of D.

Case 1.7: If (AD, BD, CD) = (d, 1, 1). The same reasoning as 1.5 identifies the position of D.

Assuming we do not know what the distance d is there are altogether 10 possible positions for D. So this is a possible solution.

Case 2: If (AB, AC, BC) = (1, 1, d), then ABC forms an isosceles triangle with an angle of θ (0 < θ < 180°) at A.

We don’t know what θ is, but George would be able to measure it:

Case 2.1: θ = 30°. There are 3 possible positions for D.

Case 2.2: θ = 36°. There are 2 possible positions for D.

Case 2.3: θ = 60°. There is 1 possible position for D.

Case 2.4: θ = 90°. There is 1 possible position for D.

Case 2.5: θ = 108°. There are 2 possible positions for D.

Case 2.6: θ = 120°. There are 2 possible positions for D.

Case 2.7: θ = 150°. There are 3 possible positions for D.

I think that is an exhaustive list, and none of them have 4 or more possible positions for D. In some ways finding these positions was more fun than solving the actual problem.

Case 3: If (AB, AC, BC) = (1, d, 1). The same reasoning as Case 2 holds.

Case 4: If (AB, AC, BC) = (1, d, d), then ABC forms an isosceles triangle with an angle of φ (0 < φ < 90°) at A. The same reasoning as Case 2 for θ = 180° − 2φ gives us the possible positions for D.

So the only case where there are 4 or more possible positions for D is in Case 1 (where the remaining trees form an equilateral triangle, and the distance d is not known).

Solution: There are 10 possible positions for the missing tree.

This diagram shows the three remaining trees in black with the unit distances between them also in black. The possible 10 positions of the missing tree are shown in colour (red, green and blue). It makes sense that the four possible positions George has identified are the red and blue ones, and he is working on calculating the green positions.

Here are diagrams of the individual cases. The non-unit distances are shown in the appropriate colours, and where there are multiple possible positions for the missing tree the distances are only shown to one of the positions.

Case 1.1: Cases 1.2, 1.3, 1.4:  Cases 1.5, 1.6, 1.7: 2. Hugh Casement 11 April 2016 at 4:05 pm

I think for the green positions d = 2 arcsin(15°) or 2 arcsin(75°).
I can’t find neat expressions for those, but they’re not 2 ± √3.
Have I misunderstood something?

• Jim Randell 11 April 2016 at 6:55 pm

I used the cosine rule to find the square of the distance d, so there should be an extra √ sign in there: d = √(2 ± √3).

• Hugh Casement 12 April 2016 at 7:15 am

Yes, Jim: it all came to me when lying in bed last night. Of course I meant sin rather than arcsin, and I then realized your expressions were for d². I must learn to switch on brain before posting comments!

This site uses Akismet to reduce spam. Learn how your comment data is processed.