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.

It does not matter where the gallows or trees are located, but it does matter which tree is tree A and which tree is tree B.

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).

Yes, it does matter where the gallows and the trees are located. The instructions on the parchment provide specific steps to follow in order to find the treasure. The distance between the gallows and the trees is crucial for determining the location of the spikes and ultimately the treasure.

According to the instructions, you need to:

1. Start at the gallows and count the steps required to walk in a straight line to tree A.
2. Turn 90 degrees to the left and walk forward the same number of steps, placing a spike at the stop point.
3. Return to the gallows and count your steps in a straight line to tree B.
4. Turn 90 degrees to the right and walk forward the same number of steps, placing another spike at the stop point.
5. Dig at the point exactly halfway between the spikes to find the treasure.

Since the parchment does not provide any alternate instructions or ways to calculate the steps, the absence of the gallows prevents you from accurately following the directions. Without the starting point (gallows), you will not be able to determine the correct location of the spikes and find the treasure.

In order to proceed and find the treasure, you would either need to locate the missing gallows or find another point of reference that matches the instructions given.