[net.puzzle] PIRATE PROBLEM **SPOILER**

bpc@bbncc5.UUCP (Bernie Cosell) (10/27/85)

The problem is pretty simple if you do it analytically instead of
geometrically.  Presume that the origin is at one of the landmarks and the
other is at (a,b).  The ship lands at a random (x,y).  We'll show that the
final coordinates of the burial point is independent of (x,y).

***NOTE: one thing underspecified in the problem but that is *crucial* is that
the pirates must turn in *OPPOSITE* directions.  It makes no difference which
party turns clockwise or counter-clockwise, just that they one goes one way and
the other goes the other.

First off, we must note that a rotation by 90 degress takes a vector (p1,p2) to
(-/+p2, +/-p1).  note that the first is minus-plus, and the second is
plus-minus.  You take the top or bottom signs depending on whether you turn to
the left or the right.

So, the pirates start at (x,y).  One group goes to (0,0) turns 90 degress and
goes an equivalent distance, the other goes to (a,b).  It is a simple bit of
vector manipulation to determine the coordinates after the hike/turn/hikeagain:
    Via (0,0): Starting at (x,y) the first hike traverses (-x, -y), turn gets
    the second leg to be (+/- y, -/+ x), and since the turn is at (0,0), you
    end up at just those coordinates.

    Via (a,b): the first hike traverses (a-x, b-y). The turn (in the *OPPOSITE*
    direction, and so the +/-'s are reversed) gets a second leg of
    (+/- (b-y), -/+ (a-x)).  The turn is at (a,b), and so the second group
    ends at (a +/- (b-y), b -/+ (a-x)).

Now they do the burial at the midpoint between where they ended up.  This is
just the average of the coordinates of the two endpoints:

    ((+/- y + a +/- (b-y)) / 2, (-/+ x + b -/+ (a-x)) / 2)
 =  ((+/- y + a +/- b -/+ y) / 2, (-/+ x + b -/+ a +/- x) / 2)

 The terms in x and y conveniently cancel (whew!), and so the treasure always
 ends up at:

    ((a +/- b) / 2, (b -/+ a) / 2)

/Bernie

Bernie Cosell                   bbncc5!bpc
BBN Labs, Inc                   ARPA: cosell@bbn-labs-b

lhl@lanl.ARPA (10/29/85)

In article <874@bbncc5.UUCP> cosell@bbn-labs-b writes:
>The problem is pretty simple if you do it analytically instead of
>geometrically.
>
>***NOTE: one thing underspecified in the problem but that is *crucial* is that
>the pirates must turn in *OPPOSITE* directions.  It makes no difference which
>party turns clockwise or counter-clockwise, just that they one goes one way and
>the other goes the other.

Yes, it is crucial that they turn in opposite directions, but it does make a
difference which turns clockwise.

Let the landmarks be at (0,h) and (0,-h).  If the pirate walking to (0,h)
turns clockwise, the treasure will be buried at (h,0); if counterclockwise,
at (-h,0).

An easy way to see this is to have them start at either one of these points.