You have found an old parchment that describes the location of buried treasure! It states:
"On Triangle Island there are only two trees, A and B, and the remains of a gallows. Start at the gallows and count the steps required to walk in a straight line to tree A. At the tree turn 90 degrees to the left and then walk forward the same number of steps. At the point where you stop, drive a spike into the ground.
"Return to the gallows. Now walk in a straight line and count your steps to tree B. When you reach the tree, turn 90 degrees to the right and take the same number of steps forward, placing another spike at the point where you stop. Dig at the point exactly halfway between the spikes and you will find the treasure."
With this information in hand, you speed off to the island. But when you get there, you find the gallows missing! Is there any way you can still get to the treasure??
No, you may not dig up the entire island - you may dig only once!!!
Does it really matter where the gallows or tree are located? Explain why or why not.
1 answer
To demonstrate that the above statement is true, we have to first understand how coordinates of a point change when we rotate it about the origin.
Consider a point (x,y) in the first quadrant. If the point is rotated 90° counter-clockwise (CCW) about the origin, then the new coordinates are (-y,x). If the point is rotated 90° clockwise (CW) about the origin, the new coordinates are (y,-x). This can be demonstrated by drawing a sample point, or multiplying the coordinates by the rotation matrix:
cos(90) sin(90)
-sin(90) cos(90)
Now assume the coordinates of tree A be denoted (XA, YA), and those of tree B be (XB, YB). The position of the gallows is (X0,Y0).
Denote by (X1,Y1) the position of the first spike after the rotation to the left (CCW), and (X2,Y2) the position of the second spike ftere the rotation to the right (CW).
We know the initial position (X0,Y0), and the position of the first tree (centre of rotation, equivalent to the origin) as (XA,YA). The position of (X1,Y1) after the CCW rotation is therefore:
X1=XA+(YA-Y0), and
Y1=YA-(XA-X0)
Similarly, the position of (X2,Y2) after the CW rotation is:
X2=XB-(YB-Y0)
Y2=YB+(XB-X0)
The mid-point between (X1,Y1) and (X2,Y2) is therefore:
X=(1/2)(X1+X2)
=(1/2)(XA+XB+Y0-Y0+YA-YB)
=(1/2)(XA+XB+YA-YB)
Y=(1/2)(Y1+Y2)
=(1/2)(YA+YB+X0-X0-XA+XB)
=(1/2))YA+YB-XA+XB)
So we see that the location of the treasure,
(X,Y)=((1/2)(XA+XB+YA-YB),(1/2)(YA+YB-XA+XB))
is independent of the initial location of the gallows, (X0,Y0).