Fog Creek Software
Discussion Board

treasure island

I don't think you're correct in saying there are two solutions to this problem. Even if you say the coconut tree is at (c,0) instead of (1,0), there's still only one constant c; it might be negative or it might be positive, but it's still only one value. (In other words, if c were negative the target point would be in another quadrant, but there would still only be one target point.)

Another way to see this is to note that there is a parity constraint to the problem, imposed by the fact that you turn left at the palm tree and right at the coconut tree; this is what guarantees that there is a unique solution. If you are allowed to vary the parity constraint, then there are actually four possibilities (you can turn left or right at each of two trees), each of which corresponds to the solution being in a different one of the four quadrants in your diagram of the problem. In the problem as stated, you have narrowed things down to just one of these four possibilities, meaning that you have picked out a unique one of the four possible solutions to the general problem.

Peter Donis

Peter Donis
Thursday, February 20, 2003

Hi, Peter

Totally agree with you - there is only one answer for the problem as it is at Joels.

Two possible points can appear if you can't tell which tree was which (e.g. both were used for firewood by aborigens and you can only tell where they were).

Four possible points howerver can't be the answer unless you modify the problem way too much - if you check you'll notice that two right or two left turns do not allow to deduct one point without knowing cannon coordinates.

take care

Thursday, February 20, 2003

*  Recent Topics

*  Fog Creek Home