Question:

Nim - anyone know how to win at this game?

by  |  earlier

0 LIKES UnLike

5,4 ,3 match game

 Tags:

   Report

3 ANSWERS


  1. Yes i do know how to win this game


  2. The perfect strategy for Nim is to return the board to a state where the count of each bit in the binary representation for each number is even.

    3= 2+1

    4= 4

    5= 4+1

    So there's currently 2 4's, 1 2, and 2 1's.  You have an odd number of 2's.  Get rid of one 2, by taking 2 from the 3 pile.  That leaves the opponent at 5,4,1, which is a losing position.

    If you want to understand the theory here, read http://en.wikipedia.org/wiki/Sprague%E2%...

  3. Yes, I do.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.