Conundrum: Nim, Part I

Iachimo likes to hang out at the local tavern, drawing in tourists to play a game of Nim. You don’t like Iachimo. You don’t like him at all. You think he’s a huckster and a con man. You’d like nothing better than to beat him at his own game. You want to beat him at Nim.

In Nim, two opponents take turns drawing from several piles of coins. On your turn, you may remove as many coins as you like from any one pile. The winner is the one who takes the last coin and leaves his opponent without a move. The coins themselves are not on the line, but Iachimo likes to make the game more interesting with a modest wager.

As you enter the tavern, you notice that Iachimo is set up for business. He has stacked five piles of coins, numbered 1, 2, 3, 4, and 5. Each pile has the same number of coins as the pile number: 1, 2, 3, 4, and 5. He sees you coming and amiably offers you a friendly wager which you quickly accept.

“I’ll go first,” you smile, and before Iachimo can object, you make your move.

What’s your first move? What’s your strategy for winning?

UPDATE: The solution is posted in the comments.

8 Responses to “Conundrum: Nim, Part I”

  1. Neel Mehta Says:

    Like Tic-Tac-Toe (and maybe Global Thermonuclear War), the odds seem to be heavily in your favor if you play first. I don’t think you have to go to a specific pile for your first move, but your goal in general is to keep an even number of piles. (This way you can guarantee that it will be your turn when only one pile remains.) Iachimo can extend the game as long as he wants, but he’s not going to win.

    I’m not sure of a good way to demonstrate this because there are so many ways the game can go. But I will suggest the following format for anyone else who wants to depict each move:

    O
    OO
    OOO
    OOOO
    OOOOO

  2. Neel Mehta Says:

    Addendum: Say Iachimo decides to extend the game as long as possible in the hopes that you slip up. Well, don’t slip up. Your first move, of course, is to empty out a pile (any will suffice) so that 4 piles remain. Then, as each of you remove 1-2 coins at a time, make sure that Iachimo can’t leave behind either 2 or 4 piles with only one coin each. If that happens, then he’ll win.

  3. Bill Says:

    This strategy will not guarantee victory. Let’s say you clear out Pile 5. Then Iachimo clears out Pile 4. (Or you clear out Pile 4, and Iachimo clears out Pile 5.)

    Now you’re left with:

    1. O
    2. OO
    3. OOO
    4.
    5.

    And you’re in trouble.

    If you take one coin from Pile 3, Iachimo takes the coin from Pile 1 (or vice versa) leaving you with two piles of two. Whatever you take from one pile, he will take from the other.

    If you take two coins from Pile 3, Iachimo takes both coins from Pile 2 (or vice versa), leaving you with two piles of one. You take one coin, and he takes the other.

    If you take all three coins from Pile 3, he takes one coin from Pile 2 (or vice versa), leaving you with two piles of one as above.

    There are actually three distinct moves you can make if you go first that will guarantee a win, even if you are playing someone as crafty as Iachimo. Can you find one of them?

  4. Bill Says:

    This was solved elsewhere, but I’ll post the answer here.

    You can force a win by taking one coin from any odd numbered pile.

    I would take a coin from Pile 5, leaving 1-2-3-4-4.

    The first three piles of 1-2-3 you can deal with as described above. As for the other two piles of 4, whatever he takes from one, you can take from the other.

  5. Shakespeare Teacher » Blog Archive » Conundrum: Nim, Part II Says:

    […] have defeated Iachimo at his own game, and he’s not […]

  6. Adela Blackledge Says:

    I bookmarked this link. Thank you for good job!

  7. Lester Ogles Says:

    We’re a group off volunteers and starting a new scheme in our community.Your website offered us with helpful info to work on. You’ve performed an impressive acticity and our whole neighborhood wwill likely be thankful toyou.

  8. free slot games with bonus Says:

    Laurel is the one you want to talk to to receive
    your new ship. Also this free play will also let you have a look at any new technique you’ve got come up with to play the slot
    machines. This brings online casino-gambling game
    of luck into a realm.

Leave a Reply