Compound Node-Kayles on Paths
In his celebrated book "On Number and Games" (Academic Press, New-York, 1976), J.H. Conway introduced twelve versions of compound games. We analyze these twelve versions for the Node-Kayles game on paths. For usual disjunctive compound, Node-Kayles h…
Authors: Adrien Guignard (LaBRI), Eric Sopena (LaBRI)
Comp ound No de-Ka yles on P aths Adrien Guignard, ´ Eric Sop ena E-mail : { Adri en.Guignard, E ric.Sopena } @labri.fr Univ ersit´ e de B o rdeaux LaBRI UMR 5800 351, cours de la Lib ´ eration F-3340 5 T alence Cedex , F rance June 18, 2018 Abstract In his celebrated bo ok On Numb ers and Games (Academic P ress, New-Y o r k, 197 6), J. H. Conw ay int ro duced tw elve versions of comp ound g ames. W e analyze these tw elve versions for the No de-Kayles game on paths. F or usua l disjunctive co mp ound, No de-Kayles has b een s o lv ed for a lo ng time under no r mal play , while it is still unsolved under mis` ere play . W e th us fo cus on the ten rema ining versions, leaving only one of them unsolved. Keyw o rds : Combinatorial game, Comp ound game, Graph game, No de-Kayles, Octal game 0.137 . AMS Mathematics Sub ject Classification 2000: 9 1A46, 9 1A43. 1 In tro duction An imp artial c ombinatorial game inv olv es t w o play ers, sa y A and B , who p la y alternately , A ha vin g the fi rst mov e, starting f rom some starting p osition G 0 [3, 5]. When no confus io n may arise, a game with starting p osition G 0 is itself denoted by G 0 . A move from a giv en p osition G consists in selecting the next p osition w ithin the fi n ite set O ( G ) = { G 1 , G 2 , . . . , G k } of the options of G ( O ( G ) corresp onds to the set of le gal moves from G ). Suc h a game is imp artial since the set O ( G ) is the s ame for eac h pla y er pla ying on G (otherwise, w e sp eak ab out p artizan games, that w e do not c onsider in this pap er). A common assumption i s that the ga me finish es after a finite num b er of mo v es and the result is a unique winner. In norm al play , the last pla y er able to m ov e (to a p osition G with O ( G ) = ∅ ) wins the game. Con versely , in mis` er e play , th e first p la yer unable to mov e (from a p osition G with O ( G ) = ∅ ) wins the game. A fund amental prop ert y of finite imp artia l combinato rial games is that the outc ome of any suc h game (that is w h ic h of the t wo pla yers h as a winning strategy) is completely determined b y its starting p osition or, in other w ord s, b y the game itself. The main questions w e consider when analyzing an imp a rtial com bin at orial game are ( i ) to determine the outcome o ( G ) of a game G a nd ( ii ) to dete rmine wh ic h str ate gy the winner has to use. W e set o ( G ) = N (resp . o ( G ) = P ) w hen th e first pla y er (resp. second pla y er), that is the N ext pla yer (resp. the Previous pla y er), has a winnin g strategy , and , in that case, G is called a N -position (r esp . P -p osition). F or impartial combinato rial games un der n ormal play , these qu esti ons can b e answered using the S prague-Grundy Theory [3, 5], indep enden tly disco v ered b y Sprague [20] and Grundy [12]: eac h game G is equiv alen t to an in sta nce of the game of Nim on a heap of size n , for some n ≥ 0. W e then defin e the Spr ague- Grund y numb er ρ ( G ) of su c h a game G by ρ ( G ) = n . 1 Therefore, in normal pla y , o ( G ) = P if and only if ρ ( G ) = 0. F or an y game G , the v alue of ρ ( G ) can b e compu te d as the least non n e gativ e inte ger whic h do es not app ear in the set { ρ ( G i ) , G i ∈ O ( G ) } , denoted b y mex ( { ρ ( G i ) , G i ∈ O ( G ) } ) (minimum exclud ed v alue). The strategy is then the follo wing: when pla ying on a game G with o ( G ) = N (whic h implies ρ ( G ) > 0), c ho ose an option G i in O ( G ) with ρ ( G i ) = 0 (suc h an option exists b y d efinition of ρ ). The disjunctive su m of tw o impartial combinato rial games G and H , d e noted by G + H , is the game inductiv ely defined by O ( G + H ) = { G i + H , G i ∈ O ( G ) } ∪ { G + H j , H j ∈ O ( H ) } (in other words, a mov e in G + H consists in either pla ying on G or p la ying on H ). The S p rague- Grundy v alue of G + H is obtai ned as ρ ( G + H ) = ρ ( G ) ⊕ ρ ( H ), wh e re ⊕ sta nds for the binary X OR op eration (called Nim-sum in this con text). The disj u nctiv e su m of com b inato rial games is the most common wa y of pla yin g the so-called c omp ound games , that is games m ad e of several separated comp onen ts. (The main s ub ject of this pap er is to consider other w a ys of pla ying su ch comp ound games) . F ollo wing an insp iring pap er by Sm ith [19], Con wa y p roposed in [5, Chapter 14] tw elv e wa ys of pla ying comp ound games, according to the ru le deciding the end of the game, to th e n o rmal or mis` ere pla y , and to the p ossibilit y of p laying on one or more comp onen ts d uring the s ame mo ve. No de-Ka yles is an impartial com binatorial game pla yed on und irec ted graphs. A mov e consists in c ho osing a v ertex and deleting this v ertex tog ether with it s neig h b ours. I f w e denote b y N + ( v ) the set cont aining the v er tex v together with its n ei gb ours, we then ha ve O ( G ) = { G \ N + ( v ) , v ∈ V ( G ) } for ev ery graph (or, equiv alen tly , game) G . If G is a n on-c onnected graph with k comp onen ts, say C 1 , C 2 , . . . , C k , playing on G is equiv alent to pla yin g on the disjunctive sum C 1 + C 2 + . . . + C k of its comp onen ts (since a mo v e consists in choosing a vertex in exactly one of the comp onen ts of G ). No de-Ka yles is a generalisation of Kayle s [3 , Chapter 4], indep endently introduced b y Du- deney [9 ] and Lo yd [14]. Th is original game is pla y ed on a ro w of pins b y t wo skilful p lay ers who could kno c k down either one or t wo adjacen t pins. Pla ying No de-Ka yles on a path is equiv alent to a particular T ake-and-Br e ak game int ro duced b y Da w s o n [6], and no w known as Dawson ’s chess , wh ich corresp onds to the o ctal game 0.137 (see [3, Chapter 4], [5, Ch a pter 11], or [10] for more details). This game h as b een completely solv ed b y using Sprague-Grun d y Th eo ry (see Section 3.1). No de-Ka yles has b een considered b y several authors. Schae ffer [17 ] pro v ed that deciding the outcome of No de-Ka yles is PSP ACE-co mplete f o r general graph s. In [4], Bo dlaender and Kratsc h pro v ed that this q u estio n is p olynomial time solv able f o r graph s w ith b oun d ed asteroidal n u m b er. (This class con tains sev eral we ll-kno wn graph classes su ch as cographs, co co mparabilit y graphs or int erv al graphs f o r ins tance.) Bo dlaender and K ratsc h prop osed the problem of determining the complexit y of No de-Ka yles on trees. T o our b est knowledge, this problem is still unsolve d. In 1978 already , Sc haeffer mentio nned as an op en p roblem to determine the complexit y of No de- Ka yles on stars , that is trees ha ving exactly one v ertex of degree at least three. Fleisc her and T rip pen prov ed in [11] that this pr o blem is p olynomial time solv able. In this pap er, we in vestig ate C on w a y’s tw elv e v ersions of comp ound games for Nod e- Ka yles on paths. Let P n denote th e p at h w ith n v ertices and, for any i and j , P i ∪ P j denote the disjoint union of P i and P j . As observed b efore, we ha v e O ( P 1 ) = O ( P 2 ) = P 0 , O ( P 3 ) = { P 0 , P 1 } and O ( P n ) = { P n − 2 , P n − 3 } ∪ { P i ∪ P j , j ≥ i ≥ 1 , i + j = n − 3 } (and, of course, O ( P 0 ) = ∅ ). With initial p osition P n , an y fu rther p osition w ill thus b e made of k disjoin t paths, P i 1 ∪ P i 2 ∪ . . . ∪ P i k , with i 1 + i 2 + . . . + i k ≤ n − 3( k − 1) (since the only w ay to br eak a p at h int o t w o separate d paths is to delete three “non-extremal” v ertices), wh ic h corresp onds to a comp ound game. Differen t rules for pla y in g on this set of paths will lead to (ve ry) different situations. This pap er is organised as follo ws. In Sectio n 2, w e presen t in more details Con w ay’s t welv e 2 v ersions of comp ound games together with the to ols a v ailable for analyzing them, as in tro duced in Conw a ys’s b o ok [5, Chapter 14] . W e then consider these t welv e versions of No de-Ka yles on paths in Section 3 and d iscu ss some p ossible extensions in S ec tion 4. 2 Con w a y’s t w elv e v ersions of comp ound games W e recall in th is s ection the tw elv e ve rsions of comp ound games introd uced by Con w ay [5, Chapter 14]. Let G b e a game made of sev eral indep endent games G 1 , G 2 , . . . , G k (imagine for instance that we are pla yin g No de-Ka yles on a graph G with connected comp onen ts G 1 , G 2 , . . . , G k ). As we hav e seen in the pr evi ous section, the game G = G 1 + G 2 + . . . + G k is the disjunctive c omp ound g ame obtained as the disju nctiv e s um of its comp onen ts. In this situation, a c omp ound move consists in making one legal m o ve in exactly one of the comp onen ts. By mo difying this mo ving r u le, we define a c onjunctive c omp ound game (a mo v e consists in pla ying in al l comp onen ts sim u lta neously ) and a sele ctive c omp ound game (a mov e consists in pla yin g in an y num b er ℓ of comp onen ts, 1 ≤ ℓ ≤ k ). W e can also distinguish t wo ru les for endin g suc h a comp ound game: the game ends either when al l th e comp onen ts ha ve end ed ( long rule ) or as so on as one of the comp onen ts has ended ( short rule ). Finally , w e ha v e already seen that there are t wo d ifferent w ays of deciding who is the winner of a game, according to the normal or mis` er e rule. Com b ining these differen t r ules, we get t wel v e d ifferent ve rsions of comp ound games. Consid - ering that the long rule is more natural for selectiv e and conjunctiv e comp ounds, wh il e the short rule is more natural for conju nctiv e comp ound, Con wa y p roposed the follo wing terminology: disjunctive c omp ound long ending rule, normal or mis` ere pla y diminishe d disjunctive c omp ound short ending rule, normal or mis` ere p la y c onjunctive c omp ound short ending rule, normal or mis` ere play c ontinue d c onjunctive c omp ound long ending rule, normal or mis` ere pla y sele c tive c omp ound long ending rule, normal or m is ` ere p la y shortene d sele ctive c omp ound short ending rule, normal or mis ` ere p lay W e now recall how one can determine the outcome of these v arious comp ound games (more details can b e foun d in [3, Ch ap ter 9] for conjun cti v e comp ounds and in [3, Chapter 10] for selectiv e comp ounds) . Disjunctiv e comp ound. Under normal p la y , th e main to o l is the Sp rag ue-Grundy Theory in tr oduced in th e previous section. The normal Sprague-Grun dy n u m b er ρ ( G ) is compu te d as the Nim-su m ρ ( G 1 ) ⊕ ρ ( G 2 ) ⊕ . . . ⊕ ρ ( G k ) (with ρ ( E ) = 0 for any ended p ositio n E ) and o ( G ) = P if and only if ρ ( G ) = 0. The situation for mis` ere pla y is more complicated and the most usefu l f eatures of the Sprague- Grundy Theory f o r normal play ha v e no n at ural counterpart in mis` ere pla y [3, Ch apter 13]. F or instance, Ka yles has b een solv ed under normal pla y in 1956, indep endently by Guy and Smith [13] a nd b y Adams a nd Benson [1] (the Sprague-Grundy sequ ence h a s a p er io d of length 12 after a p reper io d of length 70) wh ile a solution of Ka yles un der mis` ere pla y was only giv en b y Sib ert in 1973 (and pu blished in 1992 [18]). T hree m a in app roches hav e b een used in the literature to solv e mis ` ere impartial games: genus th e ory [2, 3], Sib ert-Conway de c omp osition [18] and mis` er e quotient semigr oup [16]. These te c hn iques cannot b e su m marize d in a few lines and, since we will not u se them in this pap er, we refer the int erested r ea der to the corresp onding references (see also [15]). 3 Diminished disjunctiv e compound. Under b oth normal and mis` ere pla y , we use the for e- close d Spr ague-Grundy numb er , denoted by F + ( G ) (resp. F − ( G )) in n o rmal (resp . mis` ere) p la y , and defined as follo ws. Let us declare a p osition to b e il le gal if the game has just end ed or can b e ended in a single winning m o ve (note here that winning mov es are not the same under norm a l and mis ` ere p la y). If a p osition is illegal, its foreclosed S p rague-G rund y num b er is undefine d , otherwise its foreclosed Sprague-Grund y num b er is simp ly its usual Sp rag ue-Grundy n um b er. The foreclosed Sprague-Grundy num b er o f G is then defined if and only if those of G 1 , G 2 , . . . , G k are all defined and , in th at c ase, is compu ted as their Nim-su m. No w, the outcome of G is P if its forecl osed Sp r ag ue-Grundy n umb e r is 0 or some comp onen t has outcome P bu t un defined foreclosed Sprague-Grund y num b er. Conjunctiv e comp ound. In that case, the g ame end s as soon as one of the comp onen ts ends. Therefore, “ small” comp o nent s ( that ca n b e ended in a small n um b er of mo v es) m u st b e pla yed carefully: a play er has inte rest in winning quic kly on winn ing comp onen ts and p ostp oning defeat as long as p ossible on losing ones. Considering this strat egy , a game lasts for a num b er of mo ves than can b e easily computed. This num b er of mov es is called the r emoteness of the game. Under normal pla y , the remoteness R + ( G ) is computed as follo ws: (i) if G has an op tion of even remoteness, R + ( G ) is one more the minimal even remoteness of an y option of G , ( ii) if not, th e remoteness of G is one more than the maximal o dd remoteness of any option of G . Moreo ver, the remoteness of an ended p osition is 0. A game G will then h a ve outcome P if and only if R + ( G ) is even (the second play er will play the last mo ve) . Under m is` ere pla y , the remoteness R − ( G ) is co mputed similarly , except that w e in terc h ange the w ords o dd and even in the ab o v e ru les. A game G will no w ha v e outcome P if and only if R − ( G ) is o dd . Con t in ued conjunctiv e comp ound. No w, the b est strategy is to win slo wly on winning comp onen ts and to lose quic kly on losing comp onen ts. The num b er of mo v es of a game und e r suc h a strategy is called the susp ense n u m b er of a game, d en o ted either S + ( G ) or S − ( G ). The rules for computing this num b er in normal play are the follo wing: (i) if G has an option of eve n susp ense num b er, S + ( G ) is one more the maximal even susp ense num b er of an y option of G , (ii) if not, the s usp ense num b er o f G is one more than the minimal o dd susp ense num b er of an y option of G . Moreo ver, the susp ense num b er of an ended p osition is 0. As b efore, for computing the sus p ense num b er u nder mis` ere pla y , w e in terc hange th e words o dd and even in the ab o v e rules. A game G w ill ha ve outcome P u n der normal pla y (resp. mis ` ere p lay) if and only if S + ( G ) is o dd (resp. S − ( G ) is even ). Selectiv e comp ound. The strategy here is qu it e ob vious: to win the g ame u nder normal p la y , a pla y er has to pla y on all winning comp onents. Therefore, the outco me of G is P if a nd only if the outco mes of G 1 , G 2 , . . . , G k are al l P . Under mis ` ere pla y , the winning strategy is the same, except when all the remaining comp onents are losing. I f there is only one su c h comp onen t, the p la yer will lose the game. Otherwise, he can win the game by pla ying on all bu t one of these losing comp onen ts. T herefore, unless all but one of the comp onen ts of G hav e ended, the outcome of G is th e same as in n orm a l p la y . Otherwise, its outcome is P if and only if the outcome of the only remaining comp onent is P . Shortened selectiv e comp ound. Again, to win the game, a pla y er has to pla y o n all w in ning comp onen ts. But wh en all comp onents are losing, the pla y er will lose the game (ev en u nder mis ` ere pla y , since he w ill necessary reac h some confi gu r at ion in whic h he cannot pla y on all bu t one comp onen t w it hout ending one of these comp onen ts). Hence, the rule here is ev en simpler than the pr evi ous one: un d er b oth normal play and mis` ere play , the outcome of G is P if an d 4 only if the outcomes of G 1 , G 2 , . . . , G k are all P . Note th at un d er normal pla y , all p ositions ha ve the same outcome in selectiv e comp ound and in shortened selectiv e comp ound. 3 Comp ound No de-Ka yles on paths Recall that for ev ery path P n of ord e r n ≥ 3, the set of options of P n in No de-Ka yles is giv en by O ( P n ) = { P n − 2 , P n − 3 } ∪ { P i ∪ P j , j ≥ i ≥ 1 , i + j = n − 3 } . (1) In this section, w e recall what is kn o w n for the usu al disjun c tiv e comp ound No de-Ka yles and analyze the ten other v ersions of comp ound No de-Ka yles introd uced in th e previous section. In eac h case, w e will fir st try to charact erize the set L = { i ∈ I N , o ( P i ) = P } of losing p aths and then co nsider the complexit y of determinin g the outcome of an y p osition (disjoin t union of paths). Finally , w e will stud y the complexit y of the winning str ate g y wh ich consists in findin g, for an y p osition with outcome N , an option with outcome P . 3.1 Disjunctiv e c om p ound Disjunctiv e comp osition is the most common wa y of considering comp ound games. W e recall here what is known (and unkno w n) for disj unctiv e comp ound No d e- Ka yles on paths. Normal p la y This game has b een solv ed u sing the S prague-Grundy Th e ory [3, C h apter 4]. T he sequence ρ ( P 0 ) ρ ( P 1 ) ρ ( P 2 ) . . . ρ ( P n − 1 ) ρ ( P n ) . . . is calle d the Spr ague-Grundy se quenc e of Nod e -Ka yles. It turns out that this sequence is p erio dic , with p erio d 34, after a pr eperio d of size 51. W e then ha ve: L = { 0 , 4 , 8 , 14 , 19 , 24 , 28 , 34 , 38 , 42 } ∪ { 54 + 34 i, 58 + 34 i, 62 + 34 i, 72 + 34 i, 76 + 34 i, i ≥ 0 } Determining the outcome of a path can thus b e done in constant time. F or a d isj o in t u nion of paths, w e need to compute the Nim-su m of the Sprague-Grund y n u m b ers of its comp onent s, whic h can b e done in linear time. Let no w G = P i 1 ∪ P i 2 ∪ . . . ∪ P i ℓ b e any N -p osition and assume ρ ( P i 1 ) ≤ ρ ( P i 2 ) ≤ . . . ≤ ρ ( P i ℓ ). Let i j ∈ { 1 , 2 , . . . , ℓ } b e the largest in dex su c h that ( i ) the num b er of comp onen ts with Sp rague- Grund y num b er ρ ( P i j ) is o dd and ( ii ) for ev er y r > ρ ( P i j ), the num b er of comp onen ts with Spr ague-Grun dy n u m b er r is ev en . Thanks to the prop erties of the op erator ⊕ , w e hav e ρ ( P i j ) > ⊕ k ∈{ 1 ,...,ℓ }\{ j } { P i k } . Therefore, by c h oosing an option H of P i j with ρ ( H ) = ⊕ k ∈{ 1 ,...,ℓ }\{ j } { P i k } , we get an option of G with Sp rague- Grund y n um b er 0. S uc h a “winnin g mov e” can thus be foun d in lin ear time. Mis ` ere pl a y On the other hand, the problem is stil l open for No de-Ka yles on paths under mis ` ere pla y [3, Chapter 13]. 3.2 Diminished disjunctiv e comp ound Recall that in this v ersion of disjun c tiv e comp ound, the game ends as so on as one of the com- p onen ts has ended . W e shall compute th e foreclosed S prague-Grundy n umber of p a ths. Under normal play , we shall pro ve that the corresp onding sequence is p erio dic and that the set of losing p ositio ns is finite. On the other hand, we are unable to c haracterize the se t of losing p osit ions under mis` ere pla y . 5 Normal p la y Recall that the foreclosed Sp rag ue-Grundy num b er of illega l p ositions (that is ended p ositions or p ositions that can b e wo n in one mov e) is undefin ed . Hence, w e will note F + ( P 0 ) = F + ( P 1 ) = F + ( P 2 ) = F + ( P 3 ) = ∗ . The foreclosed Sprague-Grund y num b er of other p ositions is computed as the usu al Spr ag ue-Grundy num b er, using the mex op erator. Hence, from (1), w e get for ev ery n ≥ 4: F + ( P n ) = mex ( { F + ( P n − 2 ) , F + ( P n − 3 ) } ∪ { F + ( P i ∪ P j ) , j ≥ i ≥ 1 , i + j = n − 3 } ) , with F + ( P i ∪ P j ) = F + ( P i ) ⊕ F + ( P j ). Using that form ula, and the fact that x ⊕ ∗ = ∗ ⊕ x = ∗ for ev ery x , we can compute the for e close d Spr ague- Grundy se quenc e , giv en as F + ( P 0 ) F + ( P 1 ) F + ( P 2 ) . . . F + ( P n − 1 ) F + ( P n ) . . . In [13], Guy and S mith p r o ved a us efu l p erio dici ty the or e m for o ctal games (recall that No de- Ka yles on p a ths is the o cta l game 0.137 ), wh ic h allo ws to ensu re the p erio dicit y of the usu al Sprague-Grund y sequence wh enev er t wo o ccurrences of the p erio d h av e b een computed. This theorem can easily b e extended to the foreclosed Sprague-Grund y sequence in our con text and w e ha ve: Theorem 1 Supp ose that for some p > 0 and q > 0 we have F + ( P n + p ) = F + ( P n ) for every n with q ≤ n ≤ 2 q + p + 2 . Then F + ( P n + p ) = F + ( P n ) for every n ≥ q . Pro of. W e pro ceed b y in d uctio n on n . If n ≤ 2 q + p + 2, the equalit y holds. Assume now that n ≥ 2 q + p + 3. Recall that O ( P n + p ) = { P n + p − 2 , P n + p − 3 } ∪ { P i ∪ P j , j ≥ i ≥ 1 , i + j = n + p − 3 } . Hence, w e ha ve F + ( P n + p ) = mex ( { F + ( P n + p − 2 ) , F + ( P n + p − 3 ) } ∪ { F + ( P i ) ⊕ F + ( P j ) , j ≥ i ≥ 1 , i + j = n + p − 3 } ) . Since n − 2 < n and n − 3 < n , we get by ind uctio n h yp othesis F + ( P n − 2 ) = F + ( P n + p − 2 ) and F + ( P n − 3 ) = F + ( P n + p − 3 ). S im ilarly , since q + p ≤ j n + p − 3 2 k − p ≤ j − p < n − 3, we get F + ( P j − p ) = F + ( P j ) and th u s F + ( P n + p ) = F + ( P n ). By computin g the f oreclosed S prague-Grundy sequence, w e fin d a finite num b er of losing p ositions and , thanks to Theorem 1 , we get that this sequence is p erio dic, with p erio d 84, after a prep erio d of length 245 (see T able 1, the p erio d is underlin e d). Hence w e ha v e: Corollary 2 L = { 0 , 4 , 5 , 9 , 10 , 14 , 28 , 50 , 54 , 9 8 } . Determining the outcome of an y disjoin t union of paths or finding a winning mov e from any N -p osition can b e done in linear time, using the same tec hnique as in the previous subs e ction. Mis ` ere pl a y 6 n F + ( P n ) 0 − 49 **** 00112 0 01120 31122 3112334105 341553 4255 32255 32255 50 − 99 02250 42253 4423344 253 445534 1553 42853228 53 4285442 804 100 − 149 42834422 34 4253 345533 125332253 3 22534 22534 2253 42233 4 150 − 199 22334253 34 4533 425532 255342554 4 25544 25344 2234 42533 4 200 − 249 55331253 42 2533 225342 253422534 2 23342 23342 5334 45334 2 250 − 299 55322553 42 5344 255442 534425344 2 53345 53342 5342 25332 2 300 − 349 53422534 22 5342 233422 3342533425 334255 3225 . . . T able 1: The foreclosed Spr a gue-Grundy sequence under normal pla y n N bZ M ax M ean D eviation F r eq V % F r eq V M axZ P osM ax 10 3 4 1.4 1.08 0 30% 8 9 10 2 8 11 4.23 2.4114 2 15% 98 61 10 3 11 43 13.629 7.5374 48 16 6.8% 148 999 10 4 12 163 58.5556 30.6210 93 33 2.73% 1526 9977 10 5 13 907 275.95 915 177.35 5129 128 0. 795% 1275 8 94680 10 6 16 4600 1357.3 7834 780.7 86047 4096 0.25 6% 23508 6 97950 1 T able 2: Statistics on the mis` ere foreclosed S prague-Grundy s e quence In that case, we ha ve F − ( P 0 ) = ∗ , F − ( P 1 ) = F − ( P 2 ) = 0, F − ( P 3 ) = F − ( P 4 ) = 1 and, for ev ery n ≥ 5: F − ( P n ) = mex ( { F − ( P n − 2 ) , F − ( P n − 3 ) } ∪ { F − ( P i ∪ P j ) , j ≥ i ≥ 1 , i + j = n − 3 } ) , with F − ( P i ∪ P j ) = F − ( P i ) ⊕ F − ( P j ). Using that form ula, and th e fact that x ⊕ ∗ = ∗ ⊕ x = x for ev ery x , we hav e computed the mis` ere foreclosed S prague-Grundy num b er of paths up to n = 10 6 , without b eing able to disco ver an y p erio d. Some statistics on the corresp onding sequence are s u mmarized in T able 2, where: − n is the upp er b ound of the considered in terv al I = [1 , n ], − N bZ is the num b er of paths in I with foreclosed Sp rague- Grund y num b er 0, − M ax is the maximal foreclosed Sprague-Grun d y num b er on I , − M ean is the mean of the foreclosed Sprague-Grun dy num b ers on I , − D eviation is the standard d evi ation of the foreclosed S prague-Grundy n umbers on I , − F r eq V is the most frequently encoun tered f o reclosed Sprague-Grun dy num b er on I , − % F r eq V is the p ercen tage of apparition of F reqV on I , − M axZ is the largest in dex of a path in I with foreclosed Sprague-Grund y num b er 0, − P osM ax is the index of the largest foreclosed Sp rague-G rund y num b er on I . Note that the gro wth of the mean of the foreclosed Sp rag ue-Grundy num b ers is appr o xi- mately logarithmic, whic h shows that ev en an arithmetic p erio d [3, Chap ter 4] cannot b e ex- p ected on the considered interv al. Observe also the intriguing fact th a t the most frequently encoun tered foreclosed Sp rague- Grund y num b er on the considered in terv als is alw ays of the form 2 k or 2 k + 1 (whic h seems to b e true for ev ery interv al of t yp e [1 , n ]). In fact, it app ears that this f o reclosed Sp rag ue-Grundy s equ ence is related to the Sp rag ue- Grundy s equ ence of the o ctal game 0.13337 u n der n o rmal play by the relation F − ( P n ) = ρ 0 . 13337 ( H n − 2 ), for ev ery n , n ≥ 2, wh er e H n − 2 denotes the heap of size n − 2. It is easy to c h ec k that this relation holds for paths P 2 , P 3 and P 4 . No w, let us write the options of P n , n ≥ 5, 7 whic h corr esp onds to H n − 2 , as follo ws: ( i ) P n − 2 , whic h corresp onds to H n − 4 , ( ii ) P n − 3 , whic h corresp onds to H n − 5 , ( iii ) P n − 4 ∪ P 1 ≃ P n − 4 (since P 1 is losing in one mo v e), whic h co rresp onds to H n − 6 , ( iv ) P n − 5 ∪ P 2 ≃ P n − 5 (since P 2 is losing in one mov e), which corresp onds to H n − 7 , and ( v ) { P n − 5 − j ∪ P 2+ j , 1 ≤ j ≤ n − 8 } , which corresp onds to { H n − 7 − j ∪ H j , 1 ≤ j ≤ n − 8 } . Therefore, in terms of heaps, we get: ( i ) we can remo ve 2 elemen ts in a heap, lea vin g 1 or 0 heaps, ( ii ) we can remo v e 3 elemen ts in a heap, lea ving 1 or 0 heaps, ( iii ) w e can r emo ve 4 elemen ts in a heap, lea ving 1 or 0 heaps, ( iv ) w e can remov e 5 elemen ts in a heap, lea ving 1 or 0 heaps, and ( v ) we can remov e 5 elements in a heap, lea ving 2 heaps. Since we can r emo ve 1 elemen t only from a heap of size one, w e get exactly the rules of the o ctal game 0.13337 . Up to no w , it is not kn o w n whether th e S prague-Grundy sequ ence of this o ct al game is p eriod ic or n o t [10]. 3.3 Conjunctiv e c om p ound Recall that if G = P i 1 ∪ P i 2 ∪ . . . ∪ P i k is a graph made of k disjoin t paths, we then h a ve O ( G ) = { G i 1 , G i 2 , . . . , G i k } with G i j ∈ O ( P i j ) for ev ery j , 1 ≤ j ≤ k . This v ersion of our ga me is easy to solv e. In b oth normal and m is ` ere pla y , it c an b e chec k ed that there are only a finite num b er of (small) losing paths. Therefore, we can easily determine the remoteness R + ( P ) (resp. R − ( P )) of any path P . Normal Pla y Recall that if O ( G ) = { G 1 , G 2 , . . . , G k } , the normal remoteness R + ( G ) of G is giv en by: R + ( G ) = 0 if O ( G ) = ∅ R + ( G ) = 1 + min eve n { R + ( G 1 ) , R + ( G 2 ) , . . . , R + ( G k ) } if ∃ j ∈ [1 , k ] s.t. R + ( G j ) is ev en, R + ( G ) = 1 + max odd { R + ( G 1 ) , R + ( G 2 ) , . . . , R + ( G k ) } otherwise. W e pro ve the follo wing: Theorem 3 The normal r emoteness R + of p aths satisfies: 1. R + ( P 1 ) = R + ( P 2 ) = R + ( P 3 ) = 1 , 2. R + ( P 4 ) = R + ( P 5 ) = 2 , 3. R + ( P 6 ) = R + ( P 7 ) = R + ( P 8 ) = 3 , 4. R + ( P 9 ) = R + ( P 10 ) = 4 , 5. R + ( P n ) = 3 , for every n ≥ 11 . Pro of. T he fir st four p oin ts can easily b e c heck ed. Let no w n ≥ 11. Ob serv e that P n − 7 ∪ P 4 ∈ O ( P n ). By indu ct ion on n , and thank s to the remoteness of sm a ll paths, w e h a ve R + ( P n − 7 ∪ P 4 ) = min eve n { R + ( P n − 7 ) , R + ( P 4 ) } = min eve n { R + ( P n − 7 ) , 2 } = 2 (since n − 7 ≥ 4 we h av e R + ( P n − 7 ) ≥ 2). T herefore, w e get R + ( P n ) = 1 + 2 = 3. W e th u s o btain: Corollary 4 L = { 0 , 4 , 5 , 9 , 10 } . Let n o w G = P i 1 ∪ P i 2 ∪ . . . ∪ P i ℓ b e an y disj o in t union of paths and assume i 1 ≤ i 2 ≤ . . . ≤ i ℓ . Clearly , the outcome of G is P if and only if i 1 ∈ { 4 , 5 , 9 , 10 } , wh ic h can b e d ec ided in linear time. Supp ose n o w that G is a N -p osition. If i 1 ≤ 3 , one can w in in one mo v e. If 6 ≤ i 1 ≤ 8, one can pla y in suc h a w a y that P i 1 giv es a path of length 4 or 5 and an y other comp o nent giv es a path of length at least 4. Finally , if i 1 ≥ 11, one can pla y in such a w a y that eac h comp onen t of ord e r p giv es rise to P 4 ∪ P p − 7 . Finding su c h a w inning mo ve can th us be done in linear time. 8 Mis ` ere pl a y Similarly , if O ( G ) = { G 1 , G 2 , . . . , G k } , the mis ` ere r emo teness R − ( G ) of G is giv en by: R − ( G ) = 0 if O ( G ) = ∅ R − ( G ) = 1 + min odd { R − ( G 1 ) , R − ( G 2 ) , . . . , R − ( G k ) } if ∃ j ∈ [1 , k ] s.t. R − ( G j ) is o dd, R − ( G ) = 1 + max eve n { R − ( G 1 ) , R − ( G 2 ) , . . . , R − ( G k ) } otherwise. W e pro ve the follo wing: Theorem 5 The mis` er e r emoteness R − of p aths satisfies: 1. R − ( P 1 ) = R − ( P 2 ) = 1 , 2. R − ( P n ) = 2 for every n ≥ 2 . Pro of. The first p oin t is ob vious. Similarly , w e can easily c heck that R − ( P 3 ) = R − ( P 4 ) = 2. Let no w n ≥ 5. Observe that P 1 ∪ P n − 4 ∈ O ( P n ). By induction on n , and thanks to the r e moteness of small paths, w e hav e R − ( P 1 ∪ P n − 4 ) = min odd { R − ( P 1 ) , R − ( P n − 4 ) } = min odd { 1 , R − ( P n − 4 ) } = 1 (since n − 4 > 0). Thus, w e get R − ( P n ) = 1 + 1 = 2. And therefore: Corollary 6 L = { 1 , 2 } . Hence, if G is a disjoint u n ion of paths, the outcome of G is P if an d only if th e sh ortest comp onen t in G has order 1 or 2, which can b e decided in linear time. If G is a N -p osition, a winning mo v e can b e obtained, again in linear time, by pla yin g for instance in suc h a wa y that eac h comp onen t giv es rise to a p a th of order 1. 3.4 Con tinued conjunctive comp ound In this section, w e will compute the su sp ense num b er S + ( P n ) under normal pla y (resp. S − ( P n ) under mis ` ere pla y) for eac h p ath P n . Note th a t these t wo functions are additive [5, p. 177] and w e ha ve S + ( P i ∪ P j ) = max { S + ( P i ) , S + ( P j ) } (resp. S − ( P i ∪ P j ) = max { S − ( P i ) , S − ( P j ) } ) for ev ery t wo paths P i and P j . Normal p la y Recall that if O ( G ) = { G 1 , G 2 , . . . , G k } , the normal susp ense n umber S + ( G ) of G is giv en by: S + ( G ) = 0 if O ( G ) = ∅ S + ( G ) = 1 + max eve n { S + ( G 1 ) , S + ( G 2 ) , . . . , S + ( G k ) } if ∃ j ∈ [1 , k ] s.t. S + ( G j ) is ev en, S + ( G ) = 1 + min odd { S + ( G 1 ) , S + ( G 2 ) , . . . , S + ( G k ) } otherwise. Then we p ro v e the follo wing: Theorem 7 The normal susp ense numb er S + of p aths is an incr e asing function and satisfies for every n ≥ 0 : 1. S + ( P 5(2 n − 1) ) = 2 n , 2. S + ( P k ) = 2 n + 1 , for every k ∈ [5(2 n − 1) + 1; 5(2 n +1 − 1) − 2] , 3. S + ( P 5(2 n +1 − 1) − 1 ) = 2 n + 2 . 9 Pro of. W e pro ceed b y in duction on n . F or n = 0, we can easily c h e c k that S + ( P 0 ) = 0, S + ( P 1 ) = S + ( P 2 ) = S + ( P 3 ) = 1 and that S + ( P 4 ) = S + ( P 5 ) = 2. Assume n ow that the result holds for eve ry p , 0 ≤ p < n and let k ∈ [5(2 n − 1); 5(2 n +1 − 1) − 1]. W e consider three cases. 1. k = 5(2 n − 1). Since l k − 3 2 m = 5 . 2 n − 1 − 4 > 5(2 n − 1 − 1), using induction h yp othesis, we get S + ( P j ) = 2 n − 1 for ev ery j , l k − 3 2 m ≤ j ≤ k − 4, and thus max ( S + ( P i ) , S + ( P j )) = 2 n − 1 for ev ery i, j , j ≥ i ≥ 1, i + j = k − 3. Th erefore, since S + ( P k − 2 ) = S + ( P k − 3 ) = 2 n − 1, P k has no option with ev en susp ense n umber and thus: S + ( P k ) = 1 + min odd ( { S + ( P k − 2 ) , S + ( P k − 3 ) } ∪ { max ( S + ( P i ) , S + ( P j )) , j ≥ i ≥ 1 , i + j = k − 3 } ) = 1 + min odd ( { 2 n − 1 } ∪ { 2 n − 1 } ) = 2 n 2. k ∈ [5(2 n − 1) + 1; 5(2 n +1 − 1) − 2]. Note first that for every such k , P 5(2 n − 1) ∪ P k − 3 − 5( 2 n − 1) is an option of P k with ev en susp ense num b er, sin ce k − 3 − 5(2 n − 1) ≤ 5(2 n +1 − 1) − 2 − 3 − 5(2 n − 1) = 5(2 n − 1) − 10 < 5(2 n − 1) and , thus, max ( S + ( P 5(2 n − 1) ) , S + ( P k − 3 − 5( 2 n − 1) )) = S + ( P 5(2 n − 1) ) = 2 n (thanks to the indu c tion h y p othesis and Case 1 ab o ve). Therefore: S + ( P k ) = 1 + max eve n ( { S + ( P k − 2 ) , S + ( P k − 3 ) } ∪ { max ( S + ( P i ) , S + ( P j )) , j ≥ i ≥ 1 , i + j = k − 3 } ) . W e no w p roceed by induction on k . W e ha v e S + ( P 5(2 n − 1)+1 ) = 1 + max eve n ( { S + ( P 5(2 n − 1) − 1 ) , S + ( P 5(2 n − 1) − 2 ) } ∪ { max ( S + ( P i ) , S + ( P j )) , j ≥ i ≥ 1 , i + j = 5(2 n − 1) − 2 } ) = 1 + max eve n ( { 2 n, 2 n − 1 } ∪ { 2 n − 1 , 2 n } ) = 2 n + 1 . and, simila rly , S + ( P 5(2 n − 1)+2 ) = S + ( P 5(2 n − 1)+3 ) = 2 n + 1. T hen, using ind u cti on h yp oth- esis, w e get S + ( P k ) = 1 + max eve n ( { S + ( P k − 2 ) , S + ( P k − 3 ) } ∪ { max ( S + ( P i ) , S + ( P j )) , j ≥ i ≥ 1 , i + j = k − 3 } ) = 1 + max eve n ( { 2 n − 1 } ∪ { 2 n − 1 , 2 n } ) = 2 n + 1 . 3. k = 5(2 n +1 − 1) − 1. Thanks to Case 2 ab o v e, w e h a ve S + ( P k − 2 ) = S + ( P k − 3 ) = 2 n + 1. Moreo v er, s ince l k − 3 2 m = 5 . 2 n − 3 > 5(2 n − 1), using induction hyp othesis and Case 2 ab o ve, we get S + ( P j ) = 2 n + 1 for eve ry j , l k − 3 2 m ≤ j ≤ k − 4, and th us max ( S + ( P i ) , S + ( P j )) = 2 n + 1 for ev ery i, j , j ≥ i ≥ 1, i + j = k − 3. Hence, P k has no option with ev en sus p ense num b er and th us: S + ( P k ) = 1 + min odd ( { S + ( P k − 2 ) , S + ( P k − 3 ) } ∪ { max ( S + ( P i ) , S + ( P j )) , j ≥ i ≥ 1 , i + j = k − 3 } ) = 1 + min odd ( { 2 n + 1 } ∪ { 2 n + 1 } ) = 2 n + 2 10 And therefore: Corollary 8 L = { 5(2 n − 1) , n ≥ 0 } ∪ { 5(2 n +1 − 1) − 1 , n ≥ 0 } . Note that Th eo rem 7 sh o ws th at the normal susp ense sequence of paths has a ge ometric p erio d with geometric ratio 2. Let G = P i 1 ∪ P i 2 ∪ . . . ∪ P i ℓ b e a disjoint union of paths and assume i 1 ≤ i 2 ≤ . . . ≤ i ℓ . The p osition G has outcome P if and only if i ℓ ∈ L , wh ic h can b e decided in linear time. No w , if G is a N -p osition, let r b e the greatest in teger su c h that t = 5(2 r − 1) < i ℓ . A win ning mov e can b e obtained b y pla yin g in such a wa y that eac h comp onen t of order p > t giv es rise to P t − 1 (if p = t + 1), to P t (if p = t + 2) or to P t ∪ P p − t − 3 (otherwise). Su c h a mo ve clearly leads to a P -p osition and can b e found in linear time. Mis ` ere pl a y Recall that if O ( G ) = { G 1 , G 2 , . . . , G k } , the mis` ere susp ense n umb er S − ( G ) of G is give n by: S − ( G ) = 0 if O ( G ) = ∅ S − ( G ) = 1 + max odd { S − ( G 1 ) , S − ( G 2 ) , . . . , S − ( G k ) } if ∃ j ∈ [1 , k ] s.t. S − ( G j ) is o dd, S − ( G ) = 1 + min eve n { S − ( G 1 ) , S − ( G 2 ) , . . . , S − ( G k ) } otherwise. Then we p ro v e the follo wing: Theorem 9 The mis` er e susp e nse numb er S − of p aths is an incr e asing function and satisfies for every n ≥ 0 : 1. S − ( P 7 . 2 n − 6) ) = 2 n + 1 , 2. S − ( P 7 . 2 n − 5) ) = 2 n + 1 , 3. S − ( P k ) = 2 n + 2 for every k , 7 . 2 n − 4 ≤ k ≤ 7 . 2 n +1 − 7 . Pro of. T he proof is very similar to that of Theorem 7 and we th us omit it. And therefore: Corollary 10 L = { 7 . 2 n − 6 , n ≥ 0 } ∪ { 7 . 2 n − 5 , n ≥ 0 } . As in normal play , d et ermining the outcome o f a disjoint u n ion of paths or fi nding a winn ing mo ve from a N -p osition can b e done in linear time. 3.5 Selectiv e comp ound With selectiv e comp ound , eac h pla yer may p la y on any num b er of comp onen ts (at least one). As seen in S ec tion 2, it is enough to kn ow the outcome of eac h comp onen t to d ec ide the outcome of their (disjoint) u nion. T herefore, we s h all simply compu te a b o ole an fun ction σ , defined by σ ( P ) = 1 (resp. σ ( P ) = 0) if and only if o ( P ) = N (resp. o ( P ) = P ) for ev ery path P . Then we h a ve: ( σ ( G ) = 0 (normal) or 1 (mis ` ere) if O ( G ) = ∅ , σ ( G ) = 1 − min { σ ( G ′ ) , G ′ ∈ O ( G ) } otherwise . 11 The f unction σ is add it iv e, under b oth normal and mis ` ere pla y , and we ha ve σ ( P i ∪ P j ) = σ ( P i ) ∨ σ ( P j ) (b o o lean disjunction) for an y t w o non-emp t y p a ths P i and P j . W e shall prov e that the sequence σ ( P 0 ) σ ( P 1 ) σ ( P 2 ) . . . σ ( P n − 1 ) σ ( P n ) . . . has p erio d 5 u nder normal pla y and p erio d 7 under mis ` ere pla y . Normal p la y W e pro ve the follo wing: Theorem 11 F or eve ry n ≥ 0 , we have: 1. σ ( P 5 n ) = σ ( P 5 n +4 ) = 0 , 2. σ ( P 5 n +1 ) = σ ( P 5 n +2 ) = σ ( P 5 n +3 ) = 1 . Pro of. W e pro ceed by in duction on n . F or n = 0, the result clearly holds. Assume now that the result holds up to n − 1. Then we ha v e: 1. Recall that O ( P 5 n ) = { P 5 n − 2 , P 5 n − 3 } ∪ { P i ∪ P j , j ≥ i ≥ 1 , i + j = 5 n − 3 } . Hence: σ ( P 5 n ) = 1 − min { σ ( P ′ ) , P ′ ∈ O ( P 5 n ) } = 1 − min { 1 , 1 , m in j ≥ i ≥ 1 , i + j =5 n − 3 { σ ( P i ) ∨ σ ( P j ) } } = 1 − min { 1 , 1 , m in j =5 n − 8 ,..., 5 n − 4 { σ ( P 5 n − 3 − j ) ∨ σ ( P j ) } } = 1 − min { 1 , 1 , m in { 0 ∨ 1 , 0 ∨ 1 , 1 ∨ 0 , 1 ∨ 0 , 1 ∨ 1 , } } = 1 − 1 = 0 W e can c h e c k in a similar wa y that σ ( P 5 n +4 ) = 0. 2. Since σ ( P 5 n ) = σ ( P 5 n − 1 ) = 0, P 5 n − 1 ∈ O ( P 5 n +1 ), P 5 n ∈ O ( P 5 n +2 ) and P 5 n ∈ O ( P 5 n +3 ), w e ha ve σ ( P 5 n +1 ) = σ ( P 5 n +2 ) = σ ( P 5 n +3 ) = 1. And therefore: Corollary 12 L = { 5 n, n ≥ 0 } ∪ { 5 n + 4 , n ≥ 0 } . No w, the outcome of a disjoint union of paths if P if and only if eac h comp onen t P is such that σ ( P ) = 0, w hic h can b e d ec ided in linear time. A winning mo ve from a N -p ositi on can b e obtained b y pla ying on eac h comp onen t P with σ ( P ) = 1 in suc h a wa y th a t this comp onen t giv es rise to a path P ′ with σ ( P ′ ) = 0, as explained in the pro of of Th eo rem 11. Here again, suc h a mo ve can b e found in linear time. Mis ` ere pl a y W e pro ve the follo wing: Theorem 13 F or eve ry n ≥ 0 , we have: 1. σ ( P 7 n +1 ) = σ ( P 7 n +2 ) = 0 , 2. σ ( P 7 n + a ) = 1 , for every a , 3 ≤ a ≤ 7 . Pro of. W e pro ceed by in duction on n . F or n = 0, the result clearly holds. Assume now that the result holds up to n − 1. Then we ha v e: 12 1. Recall that O ( P 7 n +1 ) = { P 7 n − 1 , P 7 n − 2 } ∪ { P i ∪ P j , j ≥ i ≥ 1 , i + j = 7 n − 2 } . Hence: σ ( P 7 n +1 ) = 1 − min { σ ( P ′ ) , P ′ ∈ O ( P 7 n +1 ) } = 1 − min { 1 , 1 , m in j ≥ i ≥ 1 , i + j =7 n − 2 { σ ( P i ) ∨ σ ( P j ) } } = 1 − min { 1 , 1 , m in j =7 n − 9 ,..., 7 n − 3 { σ ( P 7 n − 2 − j ) ∨ σ ( P j ) } } = 1 − min { 1 , 1 , m in { 1 ∨ 1 , 1 ∨ 1 , 1 ∨ 1 , 0 ∨ 1 , 0 ∨ 1 , 1 ∨ 0 , 1 ∨ 0 } } = 1 − 1 = 0 W e can c h e c k in a similar wa y that σ ( P 7 n +2 ) = 0. 2. Since σ ( P 7 n +1 ) = σ ( P 7 n +2 ) = 0, P 7 n +1 ∈ O ( P 7 n +3 ), P 7 n +1 ∈ O ( P 7 n +4 ) and P 7 n +2 ∈ O ( P 7 n +5 ), w e ha v e σ ( P 7 n +3 ) = σ ( P 7 n +4 ) = σ ( P 7 n +5 ) = 1. No w, observ e that P 7 n +2 ∪ P 1 ∈ O ( P 7 n +6 ). S ince σ ( P 7 n +2 ) = σ ( P 1 ) = 0 , w e ha ve σ ( P 7 n +2 ∪ P 1 ) = σ ( P 7 n +2 ) ∨ σ ( P 1 ) = 0 ∨ 0 = 0, whic h implies σ ( P 7 n +6 ) = 1. Similarly , since P 7 n +2 ∪ P 2 ∈ O ( P 7 n +7 ), w e get σ ( P 7 n +7 ) = 1. And therefore: Corollary 14 L = { 7 n + 1 , n ≥ 0 } ∪ { 7 n + 2 , n ≥ 0 } . As in normal play , d et ermining the outcome o f a disjoint u n ion of paths or fi nding a winn ing mo ve from a N -p osition can b e done in linear time. 3.6 Shortened selectiv e comp ound W e will use the same b o ole an fun ct ion σ as in the pr evio us su bsecti on. In b oth n o rmal and mis ` ere p la y , we pro ve that the corresp onding sequence is p eriodic with p erio d 5. Normal p la y As w e hav e n ot ed in Section 2 all p ositions ha v e the s ame outcome as in the selectiv e comp ound. T h erefore, w e get from the pr evious su bsectio n: Corollary 15 L = { 5 n, n ≥ 0 } ∪ { 5 n + 4 , n ≥ 0 } . The outcome of disjoint union of paths and winning mo ves are also similar. Mis ` ere pl a y On the other hand, selectiv e comp ound and sh orte ned selectiv e comp ound b eha ve differently under mis ` ere pla y . F or instance, if G is made of k isolated v ertices ( G = P 1 ∪ P 1 ∪ . . . ∪ P 1 ), with k ≥ 2, then G is a P -p osition in selectiv e comp ound and a N -p osition in shortened selectiv e comp ound. As observed in [5 , Chapter 14] the function σ is not additiv e un der m is ` ere pla y . F or instance, σ ( P 1 ) = 0 while σ ( P 1 ∪ . . . ∪ P 1 ) = 1, and σ ( P 4 ) = σ ( P 5 ) = σ ( P 8 ) = 1 while σ ( P 5 ∪ P 4 ) = 0 and σ ( P 8 ∪ P 4 ) = 1. W e first prov e the f o llo wing lemma whic h allo ws us to determine σ ( G ) for every p osition G made of at least tw o comp onen ts (p a ths). 13 Lemma 16 L et G = P i 1 ∪ P i 2 ∪ . . . ∪ P i ℓ , with ℓ ≥ 2 , and let λ i ( G ) , 0 ≤ i ≤ 4 , b e the numb er of p aths in G whose or der is c ongruent to i , mo dulo 5. Then, σ ( G ) = 0 if and only if λ 1 ( G ) + λ 2 ( G ) + λ 3 ( G ) = 0 . Pro of. W e p roceed by ind uctio n on the order n of G . Th e result clearly holds f o r n = 2 (in that case, G = P 1 ∪ P 1 and σ ( G ) = 1). S upp ose now that the result holds for ev ery p < n . Recall that O ( P k ) = { P k − 2 , P k − 3 } ∪ { P i ∪ P j , j ≥ i ≥ 1 , i + j = k − 3 } for ev ery path with k vertic es. Hence, if k ≡ 0 or 4 (mo d 5), then ev ery option of P k con tains a p a th with ord er m ≡ 1, 2 or 3 (mo d 5). Therefore, if λ 1 ( G ) + λ 2 ( G ) + λ 3 ( G ) = 0 then for ev ery option G ′ of G w e get λ 1 ( G ′ ) + λ 2 ( G ′ ) + λ 3 ( G ′ ) 6 = 0. By ind u cti on h yp othesis, that means σ ( G ′ ) = 1 for ev ery option G ′ of G , and th us σ ( G ) = 0. Supp ose no w that λ 1 ( G ) + λ 2 ( G ) + λ 3 ( G ) > 0. Note that ev ery path P k with k ≡ 1, 2 or 3 (mo d 5), has either an empty option (if k ≤ 3) or an option P k ′ with k ′ ≡ 0 or 4 (mo d 5) (b y deleting 2 or 3 vertice s on one extremit y of P k ). Therefore, by c ho osing su c h a mo ve f o r ev ery path of G of ord er k ≡ 1, 2 or 3 (mo d 5), we get an option G ′ of G with σ ( G ′ ) = 0 (by induction h yp othesis) and th us σ ( G ) = 1. W e can no w pro v e the follo wing: Theorem 17 The b o ole an func tion σ satisfies: 1. σ ( P 1 ) = σ ( P 2 ) = σ ( P 8 ) = σ ( P 9 ) = 0 , 2. σ ( P i ) = 1 for every i ∈ { 3 , 4 , 5 , 6 , 7 , 10 , 11 , 12 , 13 , 14 } , 3. σ ( P 5 n ) = σ ( P 5 n +4 ) = 0 for every n ≥ 3 , 4. σ ( P 5 n +1 ) = σ ( P 5 n +2 ) = σ ( P 5 n +3 ) = 1 for every n ≥ 3 . Pro of. T he first v alues can e asily b y c h ec ked. F or cases 3 a nd 4 we proceed b y induction on n . Since P 5 n − 1 ∈ O ( P 5 n +1 ), P 5 n ∈ O ( P 5 n +2 ), P 5 n ∈ O ( P 5 n + 3 ) and, by ind uctio n hypothesis, σ ( P 5 n − 1 ) = σ ( P 5 n ) = 0, we get σ ( P 5 n +1 ) = σ ( P 5 n +2 ) = σ ( P 5 n +3 ) = 1. Observe (as in the pro of o f Lemma 16 ) that ev ery option of P 5 n or P 5 n +4 con tains a path of order m ≡ 1, 2 or 3 (mo d 5 ). Th erefore, by Lemma 16, ev ery suc h option is a winning p osit ion, and th us σ ( P 5 n ) = σ ( P 5 n +4 ) = 0. And therefore: Corollary 18 L = { 1 , 2 , 8 , 9 } ∪ { 5 n, n ≥ 3 } ∪ { 5 n + 4 , n ≥ 3 } . No w, th e outcome of a d isjoin t un ion of paths has outcome P if and only if the order of every comp onen t b elongs to the set L , wh ic h can b e decided in linear time. A winn ing mo ve f rom a N -p osition can b e obtained by pla ying on eve ry comp onen t of ord er p / ∈ L as ind ica ted in the pro of of Theorem 17. Such a w inning mo v e can b e found in linear time. It is wo rth n oting h e re that th e set of losing paths is the same as under normal pla y (and, th u s, as in the selectiv e comp ound game under normal play), except for a few small paths, namely P 0 , P 1 , P 2 , P 4 , P 5 , P 8 , P 9 , P 10 and P 14 . W e do not hav e any explanation of this fact. 4 Discussion In this pap er, we h av e solve d ten v er s io ns of Con w a y’s comp ound No de-Ka yles on paths by pro viding the set of losing p ositions of eve ry su ch game (see T able 3 for a summary of these 14 Comp ound v ersion Losing set L disj. comp., n o rmal pla y { 0 , 4 , 8 , 14 , 19 , 24 , 28 , 34 , 38 , 42 } ∪ { 54 + 34 i, 58 + 34 i, 62 + 34 i , 72 + 34 i, 76 + 34 i, i ≥ 0 } disj. comp., mis` ere p la y unsolve d dim. d isj. comp., n ormal p la y { 0 , 4 , 5 , 9 , 10 , 14 , 28 , 50 , 54 , 98 } dim. disj. comp., mis ` ere pla y unsolve d conj. comp., n ormal p la y { 0 , 4 , 5 , 9 , 10 } conj. comp., mis` ere pla y { 1 , 2 } con t. conj. comp., normal pla y { 5(2 n − 1) , n ≥ 0 } ∪ { 5(2 n +1 − 1) − 1 , n ≥ 0 } con t. conj. comp., m is` ere p la y { 7 . 2 n − 6 , n ≥ 0 } ∪ { 7 . 2 n − 5 , n ≥ 0 } sel. comp., normal pla y { 5 n, n ≥ 0 } ∪ { 5 n + 4 , n ≥ 0 } sel. comp., mis` ere p lay { 7 n + 1 , n ≥ 0 } ∪ { 7 n + 2 , n ≥ 0 } short. sel. comp., normal pla y { 5 n, n ≥ 0 } ∪ { 5 n + 4 , n ≥ 0 } short. sel. comp., mis ` ere p la y { 1 , 2 , 8 , 9 } ∪ { 5 n, n ≥ 3 } ∪ { 5 n + 4 , n ≥ 3 } T able 3: Losing p ositions for comp ound Node-Ka yles on paths results). In eac h case, the outcome of an y p osition can b e computed in linear time. Th e q u estio n of fi nding a losing option fr o m an y win n ing p ositio n (which giv es th e winnin g strateg y) can as w ell b e solv ed in linear time. The fir st natur a l qu estio n is to complete our analysis , b y solving the d iminished d isjunc- tiv e comp ound un der mis ` ere p la y and, of cour s e , the longstanding op en p roblem of disjun ctive comp ound under mis ` ere pla y . It would also b e interesting to extend our results to other graph families, suc h as stars, tr ees or outerplanar graphs (w e can solv e f o r instance con tinued conjunctiv e comp ound Node-Ka y les on stars). Note here that all our results trivially extend to cycles sin ce w e hav e O ( C n ) = { P n − 3 } for ev ery cycle length n ≥ 3. Stromquist and Ul lman stud ie d in [21] the notion of se quential c omp ounds of games. In suc h a comp ound game G → H , no p la yer can play on H wh il e G has not end ed. They p r oposed as an open question to consider the follo wing comp ound game. Let < b e a partial order on games and G = G 1 ∪ G 2 ∪ . . . ∪ G k b e a comp ound game. Th en, a play er can p la y on comp onent G i if and on ly if there is no other comp onen t G j in G with G j > G i . This idea can b e applied to No de-Ka yles on paths by ordering the comp onen ts according to their length. (Note th a t this new rule mak es sense only for disj unctiv e and selectiv e comp ounds). Another v ariation could b e to study No de-Ka yles on dir e cte d paths (paths with d irect ed edges), where eac h pla y er deletes a vertex toget her to its out-neigh b ours . Suc h a directed v ersion of No de-Ka yles on general grap h s has b een considered in [8] (see also [7]), und er th e name of universal domination game . Finally , inspir ed by the selectiv e ru le , we could also consider a sele ctive No de-Ka yles game, where eac h pla y er d e letes a vertex together with some of its neighbour s. Restricted to paths, this game corresp onds to th e o ct al game 0.777 , still un solv ed , and lies in some sense b et ween Kayles and Dawson ’s chess . References [1] E. W. Ad ams and E. C. Benson. Nim-type games. T ec hn ica l Rep ort 13, Carnegie In s t. , 1956. 15 [2] D. T. Allemang. Generalized g en us sequences for mis ` ere o cta l ga mes. Int J. Game The ory , 30:539 –556, 2001. [3] E. R. Berlek amp , J. H. Con w ay , and R. K. Guy . Winning Ways . Two v olumes, Academic Press, London , 1982. Second edition, f ou r vo lumes (2001-200 4), A. K. P eters, W ellesley , Massac hussets. [4] H. L . Bo dlaender and D. Kratsch. Ka yles and nim b ers. J. Algorith ms , 43:106– 119, 2002. [5] J. H. Conw a y . O n Numb ers and Games . Academic Pr ess, N ew-Y ork, 1976. Second edition (2001 ), A. K. Pe ters, W ellesley , Massac hussets. [6] T. R. Da wson. Caissa’s wild r oses . 1935. Reprinte d in: Five Classics o f F airy Chess. Do v er Publication, Inc., 1973. [7] ´ E. Duch ˆ ene. Jeux c ombinatoir es su r les gr aphes (i n fr ench) . PhD thesis, Grenoble, F rance, 2006. [8] ´ E. Duc hˆ ene, S . Gra vier, and M. Mh a lla. Combinatorial graph games. Ars Combin. , to app ear. [9] H. E . Dud eney . Canterbury Puzzles , p ages 118, 220. London, 1910. [10] A. Flammenk amp. O cta l games . http://wwwhomes.uni-bielefeld.de/ac him/o ct al.h tml. [11] R. Fleisc h er and G. T ripp en. Ka yles on the wa y to the stars. In H. J. v an den Herik, Y. Bj¨ ornsson, and N. S. Netan y ahu, editors, Pr o c . 4th Int. Conf. on Computers and G ames , v olume 3846 of L e ctur e Notes in Comput. Sci. , pages 232–245, J uly 20 04. [12] P . M. Grun dy . Mathematics and games. Eu r eka , 2:6–8, 1939. [13] R. K. Guy and C. A. B. Smith. The G-v alues of v arious games. Pr o c. Cambridge Philos. So c. , 52:539 –556, 1956. [14] S. Loyd. Cyclop e dia of T ricks and Puzzles , page 232. New Y ork, 1914. [15] T. E. Plamb e c k. Mis` er e Games . h ttp://miseregames.o rg. [16] T. E. Plam b ec k. T amin g the w ild in impartial com b inato rial games. INTEGERS: The Ele ctr. J. Combin. Numb er The ory , (#G05), 2005. [17] T. J. Sc h ae ffer. On the complexit y of some t wo-p e rson p erfect-information games. J. Comput. System Sci. , 16:185– 225, 1978. [18] W. L. S ib ert an d J . H. Con w a y . Mathematical Ka yles. Int. J. Game The ory , 20:237–2 46, 1992. [19] C. A. B. S mith. Graph s and comp osite games. J. Combin. The ory , 1:51– 81, 1966. [20] R. Spr a gue. ¨ Ub er mathematisc he K amp fspiele. Tˆ ohoku Math. J. , 41:438 –444, 1936. [21] W. Stromquist and D. Ullman. Sequentia l comp ounds of com binatorial games. The or e t. Comput. Sci. , 119:311 –321, 1993. 16
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment