In the game of Nim, an arbitrary number of chips are divided into an arbitrary number of piles. Each player can remove as many chips as desired from any single pile. The last player to remove a chip wins. Consider a limited version of this game, in which three piles contain 3, 5, and 8 chips, respectively. You can represent this game as a directed graph. Each vertex in this graph is a possible configuration of the piles (chips in each pile). The initial configuration, for example, is (3, 5, 8). Each edge in the graph represents a legal move in the game.
java program
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here