Eric Roode on Wed, 8 May 2002 11:44:54 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Coin puzzle (spoiler)


Spoilers below:

































Bill Jonas writes:
 > On Wed, May 08, 2002 at 10:17:49AM -0400, Eric Roode wrote:
 > > Kudos to Mark. :-)
 > 
 > Maybe I'm missing something, but I don't see how this helps since the
 > coin pattern can be rotated while you're making your moves...

Here's how I think of it:

Ignoring rotations for the moment, the coins can be in one of only
three states: 

    '1' - One coin is different than the other three
    'O' - Opposite coins are alike (Mark's + configuration)
    'A' - Adjacent coins are alike (Mark's = configuration)

You, on the other hand, have three corresponding actions that you can
take on any given move: Flip one coin, flip opposite coins, or flip
adjacent coins.

Now construct a sort of state diagram.

    If you're in the '1' state,
    flipping 1 coin will either win, or put you in the 'O' state, or 
        put you in the 'A' state. 
    flipping opposite coins will leave you in the '1' state.
    flipping adjacent coins will leave you in the '1' state.

    If you're in the 'O' state:
    flipping 1 coin will put you in the '1' state.
    flipping opposite coins will always win.
    flipping adjacent coins will put you in the 'A' state.

    If you're in the 'A' state:
    flipping 1 coin will put you in the '1' state.
    flipping opposite coins will leave you in the 'A' state.
    flipping adjacent coins will either win, or put you in the 'O' state.

If you fiddle with some coins, you will see that the above hold true
regardless of the rotations.  Mark's solution will work, even if your
friend maliciously rotates the tableau so as to thwart you (so long as 
he/she doesn't maliciously misinterpret your instructions!).

In general, the following sequence will always win:

Intial state -->   '1'   'A'   'O'
Action:
    'O'     -->    '1'   'A'   wins
    'A'     -->    '1'   'O'(or wins)
    'O'     -->    '1'   wins
    '1'     -->    (wins, 'A' or 'O')
    'O'     -->           'A'    wins
    'A'     -->           'O'(or wins)
    'O'     -->           wins

You could choose a constant patter, like Mark did, or mix it up -- any 
combination of directions that follows O A O 1 O A O will always win.

----------------------------------------------------------------------
Eric J. Roode                                            eric@myxa.com
Senior Software Engineer, Myxa Corporation
$_{"@{[sort/./g]}"}.=$_ for sort<>;$_[s/
(.)/ $1/g].=$_ for sort%_;print@_[1..99]
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**