Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Nim
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== The subtraction game === <imagemap> File:Subtraction_game_SMIL.svg|thumb|Interactive subtraction game: Players take turns removing 1, 2 or 3 objects from an initial pool of 21 objects. The player taking the last object wins. default [http://upload.wikimedia.org/wikipedia/commons/4/4d/Subtraction_game_SMIL.svg] </imagemap> In another game which is commonly known as nim (but is better called the [[subtraction game]]), an upper bound is imposed on the number of objects that can be removed in a turn. Instead of removing arbitrarily many objects, a player can only remove 1 or 2 or ... or ''k'' at a time. This game is commonly played in practice with only one heap. Bouton's analysis carries over easily to the general multiple-heap version of this game. The only difference is that as a first step, before computing the nim-sums we must reduce the sizes of the heaps [[modular arithmetic|modulo]] ''k'' + 1. If this makes all the heaps of size zero (in misère play), the winning move is to take ''k'' objects from one of the heaps. In particular, in ideal play from a single heap of ''n'' objects, the second player can win [[if and only if]] * ''0'' = n (mod ''k'' + 1) (in normal play), or * ''1'' = n (mod ''k'' + 1) (in misère play). This follows from calculating the [[nim-sequence]] of ''S''(1, 2, ..., ''k''), <math display="block">0.123\ldots k0123\ldots k0123\ldots = \dot0.123\ldots\dot{k}, </math> from which the strategy above follows by the [[Sprague–Grundy theorem]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Nim
(section)
Add topic