Nim Game Bouton 1901

download Nim Game Bouton 1901

of 6

Transcript of Nim Game Bouton 1901

  • 8/13/2019 Nim Game Bouton 1901

    1/6

    Nim, A Game with a Complete Mathematical Theory

    Charles L. Bouton

    The Annals of Mathematics, 2nd Ser., Vol. 3, No. 1/4. (1901 - 1902), pp. 35-39.

    Stable URL:

    http://links.jstor.org/sici?sici=0003-486X%281901%2F1902%292%3A3%3A1%2F4%3C35%3ANAGWAC%3E2.0.CO%3B2-%23

    The Annals of Mathematics is currently published by Annals of Mathematics.

    Your use of the JSTOR archive indicates your acceptance of JSTOR's Terms and Conditions of Use, available athttp://www.jstor.org/about/terms.html. JSTOR's Terms and Conditions of Use provides, in part, that unless you have obtainedprior permission, you may not download an entire issue of a journal or multiple copies of articles, and you may use content inthe JSTOR archive only for your personal, non-commercial use.

    Please contact the publisher regarding any further use of this work. Publisher contact information may be obtained athttp://www.jstor.org/journals/annals.html.

    Each copy of any part of a JSTOR transmission must contain the same copyright notice that appears on the screen or printedpage of such transmission.

    JSTOR is an independent not-for-profit organization dedicated to and preserving a digital archive of scholarly journals. Formore information regarding JSTOR, please contact [email protected].

    http://www.jstor.orgWed Apr 11 23:52:44 2007

    http://links.jstor.org/sici?sici=0003-486X%281901%2F1902%292%3A3%3A1%2F4%3C35%3ANAGWAC%3E2.0.CO%3B2-%23http://www.jstor.org/about/terms.htmlhttp://www.jstor.org/journals/annals.htmlhttp://www.jstor.org/journals/annals.htmlhttp://www.jstor.org/about/terms.htmlhttp://links.jstor.org/sici?sici=0003-486X%281901%2F1902%292%3A3%3A1%2F4%3C35%3ANAGWAC%3E2.0.CO%3B2-%23
  • 8/13/2019 Nim Game Bouton 1901

    2/6

    NIM, A G A M E WITH A C O M P L E T E ;\IATHF, +I.ATICAT,T H E O R Y .

    TH E game here discussed has interested the writer on rtccount of its seem-ing complexity, and its extremely simple and complete Innthematical theory.*The mi-iter has 1101been able to discover much collcerning its history, althou ghcertain forms of it seem to be played at a num ber of A merican colleges, andat some of the American fairs. I has been called Fall-Tan, I)ut as it is notthe Chinese game of tha t name, the name in the title is proposed for it.

    1. Description of the Game Th e game is played by two players,:rnd B. Upon a tab le are placed three piles of objects of any Itind, let ussay counters. T he numb er in each pile is quite a rhitra ry, excep t that it is wellto agree thrit 110 tw o piles s11all I)e equal a t the beginning . A p1:ty is made asfr)llows :-The plrtyer selec ts one of the piles, an d from i t ttikes ns many coun-ters as he chooses; o ne, two, . . or the whole pile. The o111yessentialthings abou t a play a re th :~ t he co ul~ ters hall be taken from a single pile, I I ~tha t a t least one shall be talcen. Th e players play alter na tely , and the playerwho takes u p th e last counter or co~rnterv rom the table wins.It is the writer s pu rpose to prove th at if one of the players, say A , callleave one of a certain set of num bers upon the table, an d after th at pl ys with-

    o u t mistake, the other player, B , cannot win. Such a s et of numbel-s will becalled safe combination In outline the proof consists in showing tha t if Aleaves a safe combination on the table, B at his next move cannot leave a safecombination, and whatever B may dra w, A a t his ne xt m ove can again leave asafe combination. Tho piles aro then red l~c ed ,A always lenving a safe com-bination, and B never doing so, and lllust even tually take the last coun ter(or counters).

    2. Its Theory. A safe combination is determined as follows Write!the number of the counters in each pile in tho binary scale of ~ ~ o tn ti o n ,tndThe modiflcatiou of the game given in $6 was described to tile writer by Mr. Paul E .More iu October 1899. Mr. More at the snme time gave a method of play which althoughexpressed in a different form is really the same as that used here but he could give no proofo f his rule.

    t For example the number 9, written in this notation will appear as1.23 + 0.Z4 + 0.2 + 1.2 = 1001.

    (35)

  • 8/13/2019 Nim Game Bouton 1901

    3/6

    36 BOTJTON.place these numbers in three horizontal lines so that the units are in the sa111evertical column. If then the sum of each column is 2 or 0 i. e. congruent to0 mod. 2 , the set of numbers forms a safe combination. For example,

    1 0 0 1 ,1 0 11 1 0 0 ,

    or 9 5 , 12 is a safe combination. I t is seen at once that if any two numbersbe given, 11 third is always uniquely determined which form8 ~ safe combina-tion with the two given nurnl)ers. Moreover, it is obvio~~shat if a , b, c for111a safe combination any two of the uumbers determine the remriini~lg ne, thatis the system is closed. particular safe combilration which is used luter iathat ill which two piles are equal and the third i a ze1.o. In the proofrt whichfollow, the binary scale of notation is used throughout.

    THEOREM. f leaves a safe combination on the ttrble, B can~aoteave asof co~nbinationon the table at his next move. B call change only one pile, andI I 111ustchange one. Since when the nun~bersn two of thc piles aregiven thethirtl is uniquely determined, and since left the number rto determined in thethird pilc i. e., the pile from which B draws) B callnot leave that number.EIeliceB cannot leave a safe combination.THEOREM If leaves a safe combination on the table, andB diminishesI.oue o thepiles, can always diminish one o the two remaining piles, andleave a safe combination. Consider first an example. Suppose leaves thesafe combination nine, jive, twelve, and that B draws two froin tlle tirst pile,leaving the numbers seven, pve, twelve, or

    1 1 11 0 11 1 0 0 .

    If is to leave a safe combination by diminishing one of tho piles, it isc e:ir that he must select the third pile, that containing twelve. The nr~ n~be rwhich is safe with 111 and 101 is 10, or two. Heme must leave two in thepile which co~ltr~inswelve, or draw ten from that pile; nnd by doing so heleaves n safe combination.To prove the general theorom, let the numbers, expressed in the binaryscale, be written with the units in a vertical column, and suppose that lefta s11fe combination, B selects one of the piles and diminishes it. When anumber of the binary scale is diminished it is essential to notice that in going

  • 8/13/2019 Nim Game Bouton 1901

    4/6

    TEE GAME O NIM. 3over the num ber from left to right the first ehange which occu~.s s that some1 is changed to 0 , for if a 0 were changed to 1 the number would be increasedwhatever changes were made in th e su bsequ ent digits.* Con sider, then , thisfirst column, co u nt ii~ g rom the left, ia which a change occurs. On e alld onlyone of the other two nutnbers will c o ~ ~ t a i nin this same column, for left asafe combin:ttion. L e t seleot th e pile which contains the 1 in this colunln,and change the num ber by writing 0 in this column, ant1 filling the remainingcoluml~s o tile right wit11 0 or 1 ho as to make a s a h com bi~lat io~i .Th e col-umns to tho left rem:dn unchanged, siuce they already have the required form.Tlle new number so formed will be l ss than that i n the pile which selecteil.HCIICChittever B draws, can always diminish o ~ lo01' the piles, and leavca sat2 combination, Th at is, if a t an y play can leave t O I I:tfe co m bi~ l~t io nthe table, he can do 80 a t every sub seq ue l~t lay, :tnd never can do so.It' tho play contiliues in this way mu st win. Fo r one of the piles mu stI)e leduced to zero by either 01 B. It B reduccaa i t to ze ro , the two remain-ilip piles will be unequal, since B cat) llever ltaave a rafe combination, and ri ~ t~ is ex t Itlove will m:ilte tlleln equ al, ant1 will therea fter always leave thc~lnccl~lnl.B nlust, therefore , reduce th e second pile t o zero, an d the11 ake s allof tlie third pile, an d wins. If , on tlie other han d, is the first pla yer to re-dsco one of the piles to zero, he leaves the other two piles equal alld wins asbefore. Hence we see tha t the player who can first lcave a safe combinationon the table should win.If i t happens th r~ tn the beginning a safe combillation is pl:lced on thet a l~ l e ,he second p1:iyer shou ld win. If in the begin nin g a safe combinationis n ot placed on th e tab le, i t is e:lsily see11 t h : ~ the first plilyer canalmays leavea safe com hin at io~ ~y diminish ing some one of the piles, a l ~ d e c:111often dothis by draw ing from either one of th e three piles. The refore ill th is case thefirst player should win. T h at is, the first player should win or lose accord ingas a s:tfe coml)inatiorl is not o r is pli~c ed 11 the table at the beg in~linp.

    3. The Chance of a Safe Combination. Assuming that the numberin each pile at the beginn ing mas de trr ru i~ ledby chance, le t 11s com pute thech:inco of 11safe coml~iuntion'sbeing placcil upon the tnble. I t is easily showntha t if e:wh pile contains less t h a ~ i coun ters a nd if I I O pile is zero i e. ifther e are threo pile s), the possil)le number of different piles isThe proof o f this statement depends on t lie fa ct that the i~um ber100 . . n ciphers) ,or 2*, is greater than the number 11 (n ones ) , or 2Ib- + 2n 2 + . + 1 2 1

  • 8/13/2019 Nim Game Bouton 1901

    5/6

    The number of safe oc,mbinations in the same caasa is

    Ile~lcehe chance of a safe col.l)ination'n I je i~~g the table :tt first slaced I I ~ O I I

    and this is tltc c1tanc.e ~ h : ~ t Thc chances of tl~ eile second p l a ~ e rhol~ltlwin.first player's minlti~tg re to those of' the sccond as

    on the assr~mption hat both p laye~s nosv the theory, and that the nu1111)eruntlir v:u.ious 11ileumcrc tlelerr~~inc~dch:~nc-e. ~

    4 A List of Safe Combinations n 4 The following are the 35.ufe con~binations ll of wl~o-e iles aloe ess tiltin 16

    ) f C O I I ~ K C ,o givl, all st& conll~i~~tltionuf 11~iiibc~r.s I6 we ~h ou ldess t h a ~ h:~vet o ildd to tlic :ibi~ve :~l)lche of the for111 0, n n.

    5. Generalization. Thin Ibregoing game can I c at once genen~lizeilto the c:ise of ally numl~er f piles, with the same ~sule or playing. In thisc:tse a safe combination is a svt 1 n ~ ~ m b e r ~ luch that, when written in tile hi-nary sc:ile and s r ~ w ~ g e dith the units in tile satne veit iml column, t l ~ eurrl ofeach column is even i. e., _ 0 mod. 2) . Jubt as befire, it is shown that tho

  • 8/13/2019 Nim Game Bouton 1901

    6/6

    THE GAME O NIM 91 1ayer who first leaves a aafe com1)ination can do so a t every s t ibscq~~e~ltlay,nntl mill win. The induction proof is so direct that it seerns nllnecesuary togive it.

    6 Modification The gtlme may bo modified agreeing that thoplayel* who takes the last counter from the table loses This modification ofthe three pile game seems to be more widely known t l ~ a ~ ihat first dedcrilbecl,but its tlleory is iiot quite so simple.

    safe combination is defined just :is in the first case, except that 1. 1, Oi~ not a safe coml)inatioa, and 1, 1, 1 and 1,0,O are -afe combinations. Wlientile first theory indicate^ that A should play 1, 1, 0 lie must pl:\y either 1 1 1or 1, 0, 0. The earlier part of the proof proceetls as hefore. In order to com-plete it, we must show tlirit B c:tn llever leave 1, 1 , 1 that, when 1 , 1, 0 i . ~intlicatecl for A , he can always play either 1, 0, 0 or 1, 1, 1 :~ndinnlly th:it,if the play is cai ried out in this way B mus t take the lust counter. That Ucan never leave 1, 1, 1 is at owe clear, for A never leaves 1,1, n where n > 1,since this is not a safe combination. Secondly, let 11s consider ~vllutsets oft~umbersB clin leave which would indicate 1 1, 0 s A s next play in lle firstform of ganie. They are 1, 1, n where n > 1, and 1, n, where n > 1. Inthe first case A Ieaves 1, 1, 1 and in the second 1, 0, 0. The proof is uowe:~silg ompleted. Either A or B reduces a pile to zero. I f B does so, theother two piles are unequal nnd 110th greater th:lll unity, or at least one of thetwo remaining piles is unity. In the latter case A ol~viouslywins. In the for-mer case A makes the two piles equal, :~ndhen keeps them equal until B re-duces one of them t o 1 or 0. If 1n:iltes it 1, A take* :dl the other 1)ile if Bmakes it A takes ttll Itut 1 c,f the other piit.. Hence if U first ~*c.tluces pileIto zero A wins. If A first 1.educ.e~I pile to zero he leaves the otl~erwo pilesequal and each greater than unity, alld wins i ~ sefore. ~ ) I ~ I Y Yence i f A onth safe coml)inntions :is here motlified, B mukt take the last cou~lter ronl tliet:~hle, nt1 loses That is, in this modified game, also, the p1:lj er who (.:ui firstget a safe combination should win.

    This modified game can :rlso be ge1ier:llizcd to any n~lnibero f pile+.The saf e combinations :Ire the same as I~eforc, xcept th:it an o I 1 1i11nlI)t.r fl iles, each containing one, is now s:~fe, vhilo an cvell numller of ones is notsafe.