Discrete Applied Mathematics 214 (2016) 16–33
Contents lists available at ScienceDirect
Discrete Applied Mathematics journal homepage: www.elsevier.com/locate/dam
One pile misère bounded Nim with two alliances Xiao Zhao 1 , Wen An Liu ∗ School of Mathematics and Information Science, Henan Normal University, Xinxiang 453007, People’s Republic of China Henan Engineering Laboratory for Big Data Statistical Analysis and Optimal Control, Henan Normal University, Xinxiang 453007, People’s Republic of China
article
info
Article history: Received 1 October 2014 Received in revised form 17 October 2015 Accepted 18 May 2016 Available online 25 June 2016 Keywords: Impartial combinatorial game Nim Alliance Misère play convention Unsafe position
abstract The game of n-person one-pile bounded Nim with two alliances is investigated: Given an integer m ≥ 1 and a pile of counters, each player is allowed to remove ℓ counters from the pile, where ℓ ∈ {1, 2, . . . , m}. Suppose that n ≥ 2 players form two alliances and that each player is in exactly one alliance. Also assume that each player will support his alliance’s interests. Under misère play convention, all unsafe positions of two alliances are determined for some structures of two alliances. We also point out that some conclusions given by A.R. Kelly are not correct. Moreover, we present a possible explanation for Kelly’s inaccurate conclusions. © 2016 Elsevier B.V. All rights reserved.
1. Introduction Combinatorial game theory is a branch of mathematics devoted to studying the optimal strategy in perfect-information games where typically two players are involved. In a 2-person perfect information game two players alternately move until one of them is unable to move at his turn. Among the games of this type are Nim [2,4,8,10], End-Nim [1,9], Wythoff’s game [7,6,15], a-Wythoff’s game, (s, t )-Wythoff’s game [14,16], etc. There are two conventions: in normal play convention, the player first unable to move is the loser (his opponent the winner); in misère play convention, the player first unable to move is the winner (his opponent the loser). The positions from which the previous player can win regardless of the opponent’s moves are called P-positions and those from which the next player can win regardless of the opponent’s moves are called N-positions. The theory of such games can be found in [3,5]. 1.1. 2-person Nim The game of Nim is well known. The game is played with piles of counters. The two players take turns removing any positive integer of counters from any one pile. Under normal play convention, Bouton’s analysis of Nim [4] showed that the P-positions are those for which nim-addition on the sizes of the piles is 0, and the N-positions are those for which nimaddition on the sizes of the piles is greater than 0. In the same paper, all P-positions of Nim were determined under misère play convention.
∗ Corresponding author at: School of Mathematics and Information Sciences, Henan Normal University, Xinxiang 453007, People’s Republic of China. Fax: +86 03733326174. E-mail addresses:
[email protected] (X. Zhao),
[email protected] (W.A. Liu). 1 Fax: +86 03733326174. http://dx.doi.org/10.1016/j.dam.2016.05.015 0166-218X/© 2016 Elsevier B.V. All rights reserved.
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
17
1.2. n-person Nim During the last few years, the theory of 2-person perfect information games has been promoted to an advanced level. Naturally it is of interest to generalize as much as possible of the theory to n-person games. In 2-person perfect information games, one can always talk about what the outcome of the game should be, when each player plays it right, i.e., when each player adopts an optimal strategy. But when there are more than two players, it may not make sense to talk about the same thing. For instance, it may so happen that one of the players can help any of the players to win, but anyhow, he himself has to lose. So the outcome of the game depends on how the group coalitions are formed among the players. In previous literatures, two directions were investigated: n-person without alliance and n-person with two alliances. 1.2.1. N-person Nim without alliance The game n-person Nim without alliance was introduced in [13]: The n players are P1 , P2 , . . . , Pn , according to the initial order of turns. The players rotate turns moving counters from any one pile of (c1 , c2 , . . . , cp ). The game is ended when any player is unable to move at his turn. Naturally under normal play convention, we define the loser to be the player unable to move. If that player is Pm , say, we assign a different rank to each player, ranging from bottom to top in the order of Pm , Pm+1 , . . . , Pn , P1 , P2 , . . . , Pm−1 . In particular, the last player able to move is the top winner. Under these rules, the rank of any one player automatically determines the ranks for all. For this reason, it makes sense to say what the outcome of the game should be when each player adopts an optimal strategy toward his own highest possible rank. 1.2.2. N-person Nim with two alliances The game of n-person one-pile bounded Nim with two alliances was investigated in [12,11]: Given an integer m ≥ 1 and a pile of counters, suppose that n ≥ 2 players form two alliances and that each player is in exactly one alliance. Also assume that each player will support his alliance’s interests. Each player is allowed to remove ℓ counters from the pile, where ℓ ∈ {1, 2, . . . , m}. Under misère play convention, the alliance which takes the last counter is the loser (the other alliance is the winner); under normal play convention, the alliance which takes the last counter is the winner (the other alliance is the loser). A position is defined to be an unsafe position of one alliance if the game begins from this position and no matter what move this alliance makes, when the other alliance plays optimally, this alliance must lose. In [12,11], under misère play convention, Annela R. Kelly gave all unsafe positions of two alliances for some special structures of two alliances. However, we find that some conclusions given by A. R. Kelly are not correct. 1.3. Our games and results Definition 1 (General Structure of Two Alliances). Given n ≥ 2 players P1 , P2 , . . . , Pn in an initial order of turns. Suppose that these n players form two alliances and that each player is in exactly one alliance. Generally, n players are divided into p consecutive parts: (1) If p = 2k ≥ 2 then we represent p consecutive parts by A11 , A12 , A21 , A22 , . . . , Ak1 , Ak2 . The players in A11 , A21 , . . . , Ak1 form alliance A1 , and those in A12 , A22 , . . . , Ak2 form alliance A2 . For brevity, we call it ‘‘Alliance-[k; k]’’. (2) If p = 2k + 1 ≥ 3 then we represent p consecutive parts by A11 , A12 , A21 , A22 , . . . , Ak1 , Ak2 , Ak1+1 . The players in A11 , A21 , . . . , Ak1 , A1k+1 form alliance A1 , and those in A12 , A22 , . . . , Ak2 form alliance A2 . For brevity, we call it ‘‘Alliance[k + 1; k]’’. (3) By si we denote the number of players in Ai1 , and ti the number of players in Ai2 . For example, we consider n = 7 players P1 , P2 , . . . , P6 , P7 : (1) Assume that P1 , P2 , P5 , P6 form A1 , and P3 , P4 , P7 form A2 . By Definition 1, alliance A1 consists of two consecutive parts A11 = {P1 , P2 } and A21 = {P5 , P6 }; alliance A2 consists of two consecutive parts A12 = {P3 , P4 } and A22 = {P7 }. The structure of two alliances is ‘‘Alliance-[2; 2]’’ and s1 = s2 = 2 and t1 = 2, t2 = 1. (2) Assume that P1 , P2 , P5 , P6 , P7 form A1 , and P3 , P4 form A2 . By Definition 1, alliance A1 consists of two consecutive parts A11 = {P1 , P2 } and A21 = {P5 , P6 , P7 }; alliance A2 consists of one consecutive part A12 = {P3 , P4 }. The structure of two alliances is ‘‘Alliance-[2; 1]’’ and s1 = 2, s2 = 3 and t1 = 2. (3) Assume that P1 , P3 , P5 , P7 form A1 , and P2 , P4 , P6 form A2 . By Definition 1, alliance A1 consists of four consecutive parts A11 = {P1 }, A21 = {P3 }, A31 = {P5 } and A41 = {P7 }; alliance A2 consists of three consecutive parts A12 = {P2 }, A22 = {P4 } and A32 = {P6 }. The structure of two alliances is ‘‘Alliance-[4; 3]’’ and s1 = s2 = s3 = s4 = 1 and t1 = t2 = t3 = 1. Definition 2. (1) One-pile misère bounded Nim with Alliance-[k; k] (denoted by Γkm,k ): Given two integers m ≥ 1 and n ≥ 2. In one-pile misère bounded Nim with n players, all players form Alliance-[k; k] and each player will support his alliance’s interests. Each player is allowed to remove ℓ counters from the pile, where ℓ ∈ {1, 2, . . . , m}. The alliance which takes the last counter is the loser (the other alliance is the winner). (2) Similarly, we define One-pile misère bounded Nim with Alliance-[k + 1; k], denoted by Γkm+1,k .
18
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
Fig. 1. The property of unsafe positions of A1 for Alliance-[k; k].
Definition 3. (1) We call a position σ to be an unsafe position of A1 if the game begins from this position and no matter what move alliance A1 makes, when alliance A2 plays optimally alliance A1 must lose. (2) We call a position σ to be an unsafe position of A2 if the game begins from this position and no matter what move alliance A2 makes, when alliance A1 plays optimally alliance A2 must lose. (3) A positive integer interval [a, b] is called an unsafe interval of alliance Ai if every element of [a, b] is an unsafe position of Ai , i ∈ {1, 2}. Under normal or misère play conventions, Theorem 4 gives the sets of all unsafe positions of alliances A1 and A2 , for m = 1 and Alliance-[k + 1; k] or Alliance-[k; k]. Section 3 is devoted to one-pile misère Nim with Alliance-[2; 1] or Alliance-[1; 1], i.e., the game Γ2m,1 or Γ1m,1 . Recalling that in Γ2m,1 with n players P1 , P2 , . . . , Pn , alliance A1 consists of two consecutive parts A11 and A21 : A11 = {P1 , P2 , . . . , Ps1 }, A21 = {Ps1 +t1 +1 , Ps1 +t1 +2 , . . . , Ps1 +t1 +s2 }, alliance A2 consists of one consecutive part A12 = {Ps1 +1 , Ps1 +2 , . . . , Ps1 +t1 }, where s1 , t1 and s2 are the numbers of players in A11 , A12 and A21 , respectively. The sets of all unsafe positions of alliances A1 and A2 of Γ2m,1 are determined for any integers m ≥ 2 and s1 , s2 , t1 ≥ 1. In particular, all unsafe positions of alliances A1 and A2 of Γ1m,1 are determined for any integers m ≥ 2 and s1 , t1 ≥ 1. In Section 4, Remarks 2 and 3 show us that some conclusions given by A. R. Kelly are not correct. The reason of resulting in this kind of error is analyzed. 2. Preliminary Theorem 4. Let n ≥ 2 players be P1 , P2 , . . . , Pn in an initial order of turns. Assume that Pi1 , Pi2 , . . . , Pik form alliance A1 and the rest form alliance A2 . By P (A1 ) and P (A2 ) we denote the sets of all unsafe positions of A1 and A2 , respectively. Then for m = 1, (1) Under misère play convention, P (A1 ) =
k ∞ {qn + ij }, j=1 q=0
P (A2 ) = P (A1 ) = {1, 2, . . .} − P (A1 ). (2) Under normal play convention, P (A2 ) =
k ∞
{qn + ij },
j =1 q =0
P (A1 ) = P (A2 ) = {1, 2, . . .} − P (A2 ). Proof. It follows from the definition of Γ2m,1 and m = 1 that each player of alliances A1 and A2 can only take 1 counter. Given any integer N = qn + ij for two integers q ≥ 0 and j ∈ {1, 2, . . . , k}, the last counter must be taken away by the player Pij which belongs to alliance A1 . Under misère play convention, alliance A1 loses, hence N is an unsafe position of A1 ; under normal play convention, alliance A2 loses, hence N is an unsafe position of A2 . Similarly, for any integer N ̸∈ ∪kj=1 ∪∞ q=0 {qn + ij }, the player who takes the last counter must belong to alliance A2 . Under misère play convention, alliance A2 loses, hence N is an unsafe position of A2 ; under normal play convention, alliance A1 loses, hence N is an unsafe position of A1 . We now aim to solve the following problem: How can we determine all unsafe positions of alliances A1 and A2 for m ≥ 2 and Alliance-[k + 1; k] or Alliance-[k; k]? By P (A1 ) and P (A2 ) we denote the sets of all unsafe positions of A1 and A2 , respectively. By the definition of unsafe position, we have the following two properties: Property I. Given any initial position N ∈ P (A1 ), for any legal move of A1 , there exists a legal move of alliance A2 such that A2 leaves A1 a position N ′′ ∈ P (A1 ). In other words, if alliance A1 begins to play from N, no matter how many counters alliance A1 takes away, alliance A2 always have one way to force alliance A1 to lose. See Figs. 1 and 2.
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
19
Fig. 2. The property of unsafe positions of A1 for Alliance-[k + 1; k].
Fig. 3. The property of unsafe positions of A2 for Alliance-[k; k].
Fig. 4. The property of unsafe positions of A2 for Alliance-[k + 1; k].
Fig. 5. N = 14 is an unsafe position of A1 with m = 2, s1 = 5, t1 = 3.
Property II. Given any initial position N ∈ P (A2 ), there exists a legal move of alliance A1 such that for any legal move of A2 , A2 leaves A1 a position N ′′ ∈ P (A2 ). In other words, if alliance A1 begins to play from N, there exists a legal move of alliance A1 , such that no matter how many counters alliance A2 takes away, alliance A2 must lose. See Figs. 3 and 4. Example 1 explains the method of determining an unsafe position of alliance A1 . Example 1. We consider one-pile misère bounded Nim with Alliance-[1; 1] and m = 2, i.e., the game Γ12,1 . Given n = 8 players P1 , P2 , . . . , P8 . Suppose that 5 players P1 , P2 , P3 , P4 , P5 form alliance A1 and the players P6 , P7 , P8 form alliance A2 , i.e., s1 = 5 and t1 = 3. We claim that (1) 1, 2, 3, 4 and 5 are unsafe positions of A1 . Indeed, for any integer N ∈ {1, 2, 3, 4, 5}, alliance A1 must take all N counters and loses. (2) N = 14 is an unsafe position of A1 . The condition m = 2 implies that a legal move of A1 must take ℓ ∈ {5, 6, 7, 8, 9, 10} counters, and a legal move of A2 must take ℓ ∈ {3, 4, 5, 6} counters. Fig. 5 shows us that for any legal move of A1 , there exists a legal move of alliance A2 such that A2 leaves A1 a position N ′′ ∈ {1, 2, 3, 4, 5}. By (1), N ′′ is an unsafe position of A1 , i.e., A1 begins to play from N ′′ and loses. Remark 1. We consider one-pile misère bounded Nim with Alliance-[2; 1] and m = 2, i.e., the game Γ22,1 . Given n = 5 players P1 , P2 , P3 , P4 , P5 . Suppose that 2 players P1 , P5 form alliance A1 and the players P2 , P3 , P4 form alliance A2 , i.e., s1 = 1, t1 = 3 and s2 = 1. A. R. Kelly [12, Theorem 10] claimed that N = 12 is the largest unsafe position of A2 . But N = 18 is also an unsafe position of A2 . See Fig. 6. Example 2 is given to illustrate the method of finding unsafe intervals for one alliance. It is easy to see that an unsafe interval may result in another new unsafe interval. Example 2. We consider one-pile misère bounded Nim with Alliance-[2; 1] and m = 2, i.e., the game Γ22,1 . Given n = 5 players P1 , P2 , P3 , P4 , P5 . Suppose that 2 players P1 , P5 form alliance A1 and the players P2 , P3 , P4 form alliance A2 , i.e., s1 = 1, t1 = 3 and s2 = 1. We claim that (A) [1, 1] ∪ [6, 9] ∪ [13, 17] are unsafe positions of A1 ; (B) [2, 5] ∪ [10, 12] ∪ [18, 19] are unsafe positions of A2 . Proof. (A1) 1 is an unsafe position of A1 . Indeed, the first player P1 must take this one counter away, i.e., alliance A1 loses. (A2) Suppose that the pile size when P5 begins to move is N ∗ ∈ [1, 2], then alliance A1 loses. In fact, if N ∗ = 1 then P5 must take the last counter and then alliance A1 loses; if N ∗ = 2 then P5 or P1 must take the last counter and also alliance A1 loses.
20
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
Fig. 6. N = 18 is an unsafe position of A2 .
The interval [1, 2] results in a new unsafe interval [6, 9] of alliance A1 . Indeed,
For any N − x1 ∈ [4, 8] = [4, 5] ∪ [5, 6] ∪ [6, 7] ∪ [7, 8], there exists an integer y1 ∈ {3, 4, 5, 6} such that N − x1 − y1 ∈ [1, 2], and then A1 loses: N − x1 − 3 ∈ [1, 2] ⇒ N − x1 ∈ [4, 5], N − x1 − 4 ∈ [1, 2] ⇒ N − x1 ∈ [5, 6], N − x1 − 5 ∈ [1, 2] ⇒ N − x1 ∈ [6, 7], N − x1 − 6 ∈ [1, 2] ⇒ N − x1 ∈ [7, 8]. For any N ∈ [6, 9] = [5, 9] ∩ [6, 10], any legal move x1 ∈ {1, 2} of P1 yields N − x1 ∈ [4, 8], and then A1 loses: N − 1 ∈ [4, 8] ⇒ N ∈ [5, 9], N − 2 ∈ [4, 8] ⇒ N ∈ [6, 10]. (A3) The unsafe interval [6, 9] of A1 results in a new unsafe interval [13, 17] of A1 . Indeed,
Suppose that the pile size before P1 begins to move is N − x1 − y1 − x2 ∈ [6, 9]. By (A2), N − x1 − y1 − x2 is an unsafe position of A1 . Note that N − x1 − y1 − 1 ∈ [6, 9] ⇒ N − x1 − y1 ∈ [7, 10], N − x1 − y1 − 2 ∈ [6, 9] ⇒ N − x1 − y1 ∈ [8, 11], i.e., for N − x1 − y1 ∈ [7, 10] ∩ [8, 11] = [8, 10], any legal move x2 ∈ {1, 2} of P5 must result in N − x1 − y1 − x2 ∈ [6, 9]. Similarly, N − x1 − 3 ∈ [8, 10] ⇒ N − x1 ∈ [11, 13],
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
21
Fig. 7. The unsafe interval [2, 5] results in a new unsafe interval [10, 12].
N − x1 − 4 ∈ [8, 10] ⇒ N − x1 ∈ [12, 14], N − x1 − 5 ∈ [8, 10] ⇒ N − x1 ∈ [13, 15], N − x1 − 6 ∈ [8, 10] ⇒ N − x1 ∈ [14, 16], hence for N − x1 ∈ [11, 13] ∪ [12, 14] ∪ [13, 15] ∪ [14, 16] = [11, 16], there exists a legal move y1 ∈ {3, 4, 5, 6} such that N − x1 − y1 ∈ [8, 10]. Note that N − 1 ∈ [11, 16] ⇒ N ∈ [12, 17], N − 2 ∈ [11, 16] ⇒ N ∈ [13, 18], i.e., for N ∈ [12, 17] ∩ [13, 18] = [13, 17], any legal move x1 ∈ {1, 2} of P1 must result in N − x1 ∈ [11, 16]. Hence [13, 17] is an unsafe interval of A1 . (B1) Suppose the game begins with N counters,
If the pile size before A2 begins to move is N ∗ ∈ [1, 3], then A2 must take these counters away and loses. The interval [1, 3] results in a new unsafe interval [2, 5] of A2 . Indeed, N − 1 ∈ [1, 3] ⇒ N ∈ [2, 4], N − 2 ∈ [1, 3] ⇒ N ∈ [3, 5], hence for N ∈ [2, 4] ∪ [3, 5] = [2, 5], there exists a legal move x1 ∈ {1, 2} of P1 such that N − x1 ∈ [1, 3] and then A2 loses. (B2) The unsafe interval [2, 5] results in a new unsafe interval [10, 12] of A2 . In fact, Suppose the pile size before P1 begins to move is N − x1 − y1 − x2 ∈ [2, 5]. By (B1), N − x1 − y1 − x2 is an unsafe position of A2 . Note that N − x1 − y1 − 1 ∈ [2, 5] ⇒ N − x1 − y1 ∈ [3, 6], N − x1 − y1 − 2 ∈ [2, 5] ⇒ N − x1 − y1 ∈ [4, 7], i.e., for N − x1 − y1 ∈ [3, 6] ∪ [4, 7] = [3, 7], there exists a legal move x2 ∈ {1, 2} of P5 such that N − x1 − y1 − x2 ∈ [2, 5] and then A2 loses. Similarly, N − x1 − 3 ∈ [3, 7] ⇒ N − x1 ∈ [6, 10], N − x1 − 4 ∈ [3, 7] ⇒ N − x1 ∈ [7, 11], N − x1 − 5 ∈ [3, 7] ⇒ N − x1 ∈ [8, 12], N − x1 − 6 ∈ [3, 7] ⇒ N − x1 ∈ [9, 13], i.e., for N − x1 ∈ [6, 10] ∩ [7, 11] ∩ [8, 12] ∩ [9, 13] = [9, 10], any legal move y1 ∈ {3, 4, 5, 6} of A2 must result in N − x1 − y1 ∈ [3, 7]. Note that N − 1 ∈ [9, 10] ⇒ N ∈ [10, 11], N − 2 ∈ [9, 10] ⇒ N ∈ [11, 12], i.e., for N ∈ [10, 11] ∪ [11, 12] = [10, 12], there exists a legal move x1 ∈ {1, 2} of P1 such that N − x1 ∈ [9, 10]. Hence [10, 12] is an unsafe interval of A2 . See Fig. 7. (B3) Similarly, the unsafe interval [10, 12] results in a new unsafe interval [18, 19] of A2 , also see Fig. 7.
22
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
Example 2 shows us that an unsafe interval may result in a new unsafe interval of one alliance. Does this occur without any condition? Lemma 5 gives a negative answer. Lemma 5. We consider one-pile misère bounded Nim with Alliance-[2; 1] and m ≥ 2, i.e., the game Γ2m,1 . (1) Suppose that [a, b] is an unsafe interval of A1 . If a + (m − 1)s2 ≤ b,
(1)
a + (m − 1)(s1 + s2 − t1 ) ≤ b,
(2)
and then [a + m(s1 + s2 ) + t1 , b + (s1 + s2 ) + mt1 ] is also an unsafe interval of A1 . (2) Suppose that [c , d] is an unsafe interval of A2 . If c + (m − 1)(t1 − s2 ) ≤ d,
(3)
then [c + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ] is also an unsafe interval of A2 . Proof. (1) We show that any position N ∈ [a + m(s1 + s2 ) + t1 , b + (s1 + s2 ) + mt1 ] is an unsafe position of A1 . (1.1) It follows from Eq. (2) that [a + m(s1 + s2 ) + t1 , b + (s1 + s2 ) + mt1 ] is nonempty. Let N ∈ [a + m(s1 + s2 ) + t1 , b + (s1 + s2 ) + mt1 ], any legal move of A11 consists of taking x1 ∈ {s1 , s1 + 1, . . . , ms1 } counters from the pile of size N. Let k1 = x1 − s1 then 0 ≤ k1 ≤ ms1 − s1 , and N − x1 ∈ I1 := [a + m(s1 + s2 ) + t1 − s1 − k1 , b + (s1 + s2 ) + mt1 − s1 − k1 ]. It follows from Eq. (2) that I1 is nonempty. The condition 0 ≤ k1 ≤ (m − 1)s1 implies that a + m(s1 + s2 ) + t1 − s1 − k1 ≥ a + ms2 + t1 and b + (s1 + s2 ) + mt1 − s1 − k1 ≤ b + s2 + mt1 . Hence I1 ⊆ I2 := [a + ms2 + t1 , b + s2 + mt1 ], i.e., N − x 1 ∈ I2 .
(4)
Let I2 = [a + ms2 + t1 , b + s2 + mt1 ] =
(m −1)t1
Bi ,
(5)
i=0
where Bi = [a + ms2 + t1 + i, b + s2 + t1 + i]. It follows from Eqs. (4) and (5) that there exists an integer i∗ ∈ {0, 1, 2, . . . , (m − 1)t1 } such that N − x1 ∈ Bi∗ = [a + ms2 + t1 + i∗ , b + s2 + t1 + i∗ ]. By Eq. (1), Bi∗ is nonempty. (1.2) Alliance A2 takes y1 = t1 + i∗ counters from N − x1 . This is a legal move by virtue of 0 < t1 + i∗ ∈ {t1 , t1 + 1, . . . , mt1 }. It is easy to see that N − x1 − y1 ∈ [a + ms2 , b + s2 ]. (1.3) Any legal move of A21 consists of taking x2 ∈ {s2 , s2 + 1, . . . , ms2 } counters from the pile of size N − x1 − y1 . Let k2 = x2 − s2 then 0 ≤ k2 ≤ ms2 − s2 , and N − x1 − y1 − x2 ∈ I3 := [a + ms2 − s2 − k2 , b + s2 − s2 − k2 ]. It follows from Eq. (1) that I3 is nonempty. The condition 0 ≤ k2 ≤ ms2 − s2 implies that a + ms2 − s2 − k2 ≥ a and b + s2 − s2 − k2 ≤ b. Hence I3 ⊆ [a, b], i.e., N − x1 − y1 − x2 ∈ [a, b]. Note that [a, b] is an unsafe interval of A1 , hence N − x1 − y1 − x2 is an unsafe position of A1 . (2) Let I1 = [c + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ]. It follows from Eq. (3), m ≥ 2 and s1 ≥ 1 that I1 is nonempty. We show that any position N ∈ I1 is an unsafe position of A2 . It is easy to check that ms1 −s1
I1 =
Bi ,
(6)
i =0
where Bi = [c + s1 + mt1 + s2 + i, d + ms2 + t1 + s1 + i]. (2.1) Given any position N ∈ I1 , it follows from Eq. (6) that there exists an integer i∗ ∈ {0, 1, 2, . . . , ms1 − s1 } such that N ∈ Bi∗ = [c + s2 + mt1 + s1 + i∗ , d + ms2 + t1 + s1 + i∗ ]. By Eq. (3), Bi∗ is nonempty. The s1 players in A11 take x1 = s1 + i∗ counters from N. This is a legal move by virtue of 0 < s1 + i∗ ∈ {s1 , s1 + 1, . . . , ms1 }. It is easy to see that N − x1 ∈ [c + s2 + mt1 , d + ms2 + t1 ]. (2.2) Any legal move of A2 consists of taking y1 ∈ {t1 , t1 + 1, . . . , mt1 } counters from the pile of size N − x1 . Let k1 = y1 − t1 then 0 ≤ k1 ≤ mt1 − t1 , and N − x1 − y1 ∈ I2 := [c + s2 + mt1 − (t1 + k1 ), d + ms2 + t1 − (t1 + k1 )].
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
23
It follows from Eq. (3) that I2 is nonempty. The condition 0 ≤ k1 ≤ mt1 − t1 implies that c + s2 ≤ c + s2 + mt1 − (t1 + k1 ), and d + ms2 ≥ d + ms2 + t1 − (t1 + k1 ). Hence I2 ⊆ [c + s2 , d + ms2 ], i.e., N − x1 − y1 ∈ I3 := [c + s2 , d + ms2 ]. (2.3) It is easy to check that I3 =
(m −1)s2
Ci ,
(7)
i=0
where Ci = [c + s2 + i, d + s2 + i]. It follows from Eq. (7) that there exists an integer i∗ ∈ {0, 1, 2, . . . , ms2 − s2 } such that N − x1 − y1 ∈ Ci∗ = [c + s2 + i∗ , d + s2 + i∗ ]. Also Ci∗ is nonempty as d ≥ c, m ≥ 2, s2 ≥ 1. The s2 players in A21 take x2 = s2 + i∗ counters from N − x1 − y1 . This is a legal move by virtue of 0 < s2 + i∗ ∈ {s2 , s2 + 1, . . . , ms2 }. It is easy to see that N − x1 − y1 − x2 ∈ [c , d]. Note that [c , d] is an unsafe interval of A2 , hence N − x1 − y1 − x2 is an unsafe position of A2 . Lemma 5 shows that a new unsafe interval can be derived from one unsafe interval, under some conditions. Can we deduce a new larger unsafe interval by two unsafe intervals? Lemmas 6 and 7 give positive answers. Lemma 6. We consider the game Γ2m,1 with m ≥ 2. Suppose that [a, b] and [c , d] are unsafe intervals of A2 with a ≤ b ≤ c ≤ d. If a + (m − 1)(t1 − s2 ) ≤ d,
(8)
c ≤ b + 1 + (m − 1)s2 ,
(9)
and
then [a + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ] is an unsafe interval of A2 . Proof. Let I1 = [a + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ]. We show that any position N ∈ I1 is an unsafe position of A2 . Let I1 =
(m −1)s1
Bi ,
(10)
i=0
where Bi = [a + (s1 + s2 ) + mt1 + i, d + ms2 + t1 + s1 + i]. (1) Given any position N ∈ I1 . It follows from Eq. (10) that there exists an integer i∗ ∈ {0, 1, 2, . . . , (m − 1)s1 } such that N ∈ Bi∗ = [a + s2 + mt1 + s1 + i∗ , d + ms2 + t1 + s1 + i∗ ]. By Eq. (8), Bi∗ is nonempty. Then the s1 players in A11 can take x1 = s1 + i∗ counters from N, this is a legal move by virtue of 0 < s1 + i∗ ∈ {s1 , s1 + 1, . . . , ms1 }. It is easy to see that N − x1 ∈ [a + s2 + mt1 , d + ms2 + t1 ]. (2) Any legal move of A2 consists of taking y1 ∈ {t1 , t1 + 1, . . . , mt1 } counters from the pile of size N − x1 . Let k1 = y1 − t1 then 0 ≤ k1 ≤ mt1 − t1 , and N − x1 − y1 ∈ I2 := [a + s2 + mt1 − t1 − k1 , d + ms2 + t1 − t1 − k1 ]. It follows from Eq. (8) that I2 is nonempty. The condition 0 ≤ k1 ≤ mt1 − t1 implies that a + s2 + mt1 − t1 − k1 ≥ a + s2 , and d + ms2 + t1 − t1 − k1 ≤ d + ms2 . Hence I2 ⊆ [a + s2 , d + ms2 ], i.e., N − x1 − y1 ∈ [a + s2 , d + ms2 ]. (3) It follows from Eq. (9) that
[a + s2 , d + ms2 ] = [a + s2 , b + ms2 ] ∪ [c + s2 , d + ms2 ]. For N − x1 − y1 ∈ [c + s2 , d + ms2 ] or N − x1 − y1 ∈ [a + s2 , b + ms2 ] (let c = a and d = b), by repeating the arguments of Lemma 5(2.3), we conclude that N − x1 − y1 is an unsafe position of A2 . Hence I1 = [a + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ] is an unsafe interval of A2 . Lemma 7. We consider the game Γ2m,1 with m ≥ 2. Suppose that [a, b] and [c , d] are two unsafe intervals of A1 with a ≤ b ≤ c ≤ d. If a + (m − 1)(s1 + s2 − t1 ) ≤ d,
(11)
c + (m − 1)(s2 − t1 ) ≤ b + 1,
(12)
a + (m − 1)s2 ≤ b,
(13)
24
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33 Table 1 The structures of P (A1 ) and P (A2 ) for s1 = 2, t1 = 3, s2 = 2 and m = 2. j
1
2
3
4
5
P (A1 ) P (A2 )
[1 , 2 ] [3 , 7 ]
[8, 12] [13, 18]
[19, 22] [23, 29]
[30,32] [33,40]
[41, 42] [43, 62]
[63, ∞)
and c + (m − 1)s2 ≤ d,
(14)
then [a + m(s1 + s2 ) + t1 , d + (s1 + s2 ) + mt1 ] is an unsafe interval of A1 . Proof. We show that any position N ∈ [a + m(s1 + s2 ) + t1 , d + (s1 + s2 ) + mt1 ] is an unsafe position of A1 . (1) Given an initial position N ∈ [a + m(s1 + s2 ) + t1 , d + (s1 + s2 ) + mt1 ]. Any legal move of A11 consists of taking x1 ∈ {s1 , s1 + 1, . . . , ms1 } counters from the pile of size N. Let k1 = x1 − s1 then 0 ≤ k1 ≤ ms1 − s1 , and N − x1 ∈ I1 := [a + m(s1 + s2 ) + t1 − s1 − k1 , d + (s1 + s2 ) + mt1 − s1 − k1 ]. It follows from Eq. (11) that I1 is nonempty. The condition 0 ≤ k1 ≤ ms1 − s1 implies that a + m(s1 + s2 ) + t1 − s1 − k1 ≥ a + ms2 + t1 and d + (s1 + s2 ) + mt1 − s1 − k1 ≤ d + s2 + mt1 . Hence I1 ⊆ I2 := [a + ms2 + t1 , d + s2 + mt1 ], i.e., N − x 1 ∈ I2 . (2) It follows from Eq. (12) that I2 = [a + ms2 + t1 , d + s2 + mt1 ]
= [a + ms2 + t1 , b + s2 + mt1 ] ∪ [c + ms2 + t1 , d + s2 + mt1 ]. For N − x1 ∈ [a + ms2 + t1 , b + s2 + mt1 ] or N − x1 ∈ [c + ms2 + t1 , d + s2 + mt1 ] (let a = c and b = d), Eqs. (13) and (14) show that a and b (c and d) satisfy the condition Eq. (1) of Lemma 5. By repeating the arguments of Lemma 5(1.2) and (1.3), we conclude that A1 loses. Hence, [a + m(s1 + s2 ) + t1 , d + (s1 + s2 ) + mt1 ] is an unsafe interval of A1 . 3. All unsafe positions of A1 and A2 for Γ2m,1 We now pay our attention to the game Γ2m,1 with m ≥ 2. We will give the sets of all unsafe positions of alliances A1 and A2 for any integers m ≥ 2 and s1 , s2 , t1 ≥ 1. The corresponding results depend on the relation between s1 + s2 and t1 , so we proceed by distinguishing three cases s1 + s2 > t1 , s1 + s2 = t1 and s1 + s2 < t1 . Theorems 9–11 give the explicit formulae for above three cases, respectively. Before these main results, we need some notation. Definition 8. Given integers s1 , t1 , s2 ≥ 1 and m ≥ 2, we define two sequences Pj1 and Pj2 : P01 = P02 = 0 and for j ≥ 1,
Pj1 = (j − 1)(mt1 + s1 + s2 ) + s1 , Pj2 = (j − 1)(ms1 + ms2 + t1 ) + ms1 + t1 .
(15)
Theorem 9. We consider one-pile misère Nim with Alliance-[2; 1] and s1 + s2 > t1 . By P (A1 ) and P (A2 ) we denote the sets of all unsafe positions of A1 and A2 , respectively. Then for m ≥ 2, P (A1 ) =
j∗ [Pj2−1 + 1, Pj1 ], j=1
j∗ P (A2 ) = [Pj1 + 1, Pj2 ] ∪ [Pj2∗ + 1, +∞), j=1
where j = min{j∗1 , j∗2 }, ∗
ms2 + s1 − 1
+ 1, (m − 1)(s1 + s2 − t1 ) s2 + s1 − 1 j∗2 = + 2, (m − 1)(s1 + s2 − t1 )
j∗1 =
and Pj1 , Pj2 are determined by Definition 8 (see Tables 1 and 2).
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
25
Table 2 The structures of P (A1 ) and P (A2 ) for s1 + s2 > t1 ≥ 1 and m ≥ 2. j
1
2
3
···
j−1
P (A1 ) P (A2 )
[1, s1 ] [s1 + 1, ms1 + t1 ]
[P12 + 1, P21 ] [P21 + 1, P22 ]
[P22 + 1, P31 ] [P31 + 1, P32 ]
··· ···
[Pj2−2 + 1, Pj1−1 ] [Pj1−1 + 1, Pj2−1 ]
j
j
P (A1 ) P (A2 )
j+1
+ , ] + , ]
Pj2−1 Pj1
[ [
1 Pj1 1 Pj2
+ , + ,
Pj2 Pj1+1
[ [
1 Pj1+1 1 Pj2+1
]
]
···
j∗
··· ···
[Pj2∗ −1 + 1, Pj1∗ ] [Pj1∗ + 1, Pj2∗ ]
[Pj2∗ + 1, ∞)
Proof. Let Ij1 = [Pj2−1 + 1, Pj1 ] and Ij2 = [Pj1 + 1, Pj2 ] for j ≥ 1. (1) We show that Ij2 is nonempty for any j ≥ 1. Indeed, Pj2 − (Pj1 + 1) = (j − 1)(ms1 + ms2 + t1 ) + ms1 + t1 − (j − 1)(s1 + s2 + mt1 ) − s1 − 1
= (j − 1)(m − 1)(s1 + s2 − t1 ) + (m − 1)s1 + t1 − 1 ≥ (m − 1)s1 > 0,
(16)
as j ≥ 1, m ≥ 2, s1 + s2 > t1 , s1 ≥ 1 and t1 ≥ 1. We claim that Ij1 is nonempty for 1 ≤ j ≤ j∗ . By the definition of j∗1 , we have j ≤ j∗ ≤ j∗1 ≤
ms2 + s1 − 1
(m − 1)(s1 + s2 − t1 )
+ 1.
The condition s1 + s2 > t1 implies that ms2 + s1 − 1 ≥ (j − 1)(m − 1)(s1 + s2 − t1 ). Thus Pj1 − (Pj2−1 + 1) = (j − 1)(mt1 + s1 + s2 ) + s1 − (j − 2)(ms1 + ms2 + t1 ) − t1 − ms1 − 1
= −(j − 1)(m − 1)(s1 + s2 − t1 ) + ms2 + s1 − 1 ≥ 0.
(17)
(2) We claim that P (A1 ) ∪ P (A2 ) = [1, ∞). Indeed, P (A1 ) ∪ P (A2 ) =
j∗ ([Pj2−1 + 1, Pj1 ] ∪ [Pj1 + 1, Pj2 ]) ∪ [Pj2∗ + 1, ∞). j =1
(3) Ij1 1 I1 P02
=[
+ 1, Pj1 ] is an unsafe interval of A1 for any j ∈ {1, 2, . . . , j∗ }. We proceed by induction on j. For j = 1, ] = [1, s1 ]. Given any position N ∈ [1, s1 ], the s1 players in A11 must take away all N counters and alliance
Pj2−1 1 P11
= [ + ,
A1 loses. Suppose that Ij1 = [Pj2−1 + 1, Pj1 ] with j ≤ j∗ − 1 is an unsafe interval of A1 ; we will show that Ij1+1 = [Pj2 + 1, Pj1+1 ] with j + 1 ≤ j∗ is an unsafe interval of A1 . Let a = Pj2−1 + 1 and b = Pj1 in Lemma 5(1). Then Pj2 + 1 = a + m(s1 + s2 ) + t1 and Pj1+1 = b + (s1 + s2 ) + mt1 . By the definition of j∗2 , we have j + 1 ≤ j∗ ≤ j∗2 ≤
s1 + s2 − 1 + 2. (m − 1)(s1 + s2 − t1 )
The condition s1 + s2 > t1 implies that s2 + s1 − 1 ≥ (j − 1)(m − 1)(s1 + s2 − t1 ). Thus for j + 1 ≤ j∗ , b − (a + (m − 1)s2 ) = Pj1 − Pj2−1 − 1 − (m − 1)s2 = −(j − 1)(m − 1)(s1 + s2 − t1 ) + ms2 + s1 − 1 − (m − 1)s2
= −(j − 1)(m − 1)(s1 + s2 − t1 ) + s1 + s2 − 1 ≥ 0. By the definition of j∗1 , we have j + 1 ≤ j∗ ≤ j∗1 ≤
ms2 + s1 − 1 + 1. (m − 1)(s1 + s2 − t1 )
(18)
26
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
The condition s1 + s2 > t1 implies that ms2 + s1 − 1 ≥ j(m − 1)(s1 + s2 − t1 ). Thus for j + 1 ≤ j∗ , b − (a + (m − 1)(s1 + s2 − t1 )) = Pj1+1 − (Pj2 + 1)
= −j(m − 1)(s1 + s2 − t1 ) + ms2 + s1 − 1 ≥ 0.
(19)
It follows from Lemma 5(1) and Eqs. (18) and (19) that Ij1+1 = [Pj2 + 1, Pj1+1 ] = [a + m(s1 + s2 ) + t1 , b + (s1 + s2 ) + mt1 ] is an unsafe interval of A1 . (4) We show that Ij2 = [Pj1 + 1, Pj2 ] is an unsafe interval of A2 for any j ≥ 1. We proceed by induction on j. For j = 1, I12 = [P11 + 1, P12 ] = [s1 + 1, ms1 + t1 ]. Let ms1 −s1
I12 =
Bi ,
(20)
i =0
where Bi = [1 + s1 + i, t1 + s1 + i]. Given an initial position N ∈ I12 = [s1 + 1, ms1 + t1 ]. It follows from Eq. (20) that there exists an integer i∗ ∈ {0, 1, 2, . . . , ms1 − s1 } such that N ∈ Bi∗ = [1 + s1 + i∗ , t1 + s1 + i∗ ]. Bi∗ is nonempty by virtue of t1 ≥ 1. The s1 players in A11 take x1 = s1 + i∗ counters from N. This is a legal move since 0 < s1 + i∗ ∈ {s1 , s1 + 1, . . . , ms1 }. It is easy to see that N − x1 ∈ [1, t1 ]. For any N − x1 ∈ [1, t1 ], A12 must take away all N − x1 counters and lose. Hence I12 is an unsafe interval of A2 . Suppose that Ij2 = [Pj1 + 1, Pj2 ] is an unsafe interval of A2 . We will show that Ij2+1 = [Pj1+1 + 1, Pj2+1 ] is also an unsafe interval of A2 . Let c = Pj1 + 1 and d = Pj2 in Lemma 5(2). Then Pj1+1 + 1 = c + (s1 + s2 ) + mt1 and Pj2+1 = d + m(s1 + s2 ) + t1 . It is easy to check that d − (c + (m − 1)(t1 − s2 )) = Pj2 − Pj1 − 1 + (m − 1)s2 − (m − 1)t1
= (j − 1)(m − 1)(s1 + s2 − t1 ) + (m − 1)s1 + t1 − 1 + (m − 1)s2 − (m − 1)t1 = j(m − 1)(s1 + s2 − t1 ) + t1 − 1 ≥ 0,
(21)
as s1 + s2 > t1 , j ≥ 1, m ≥ 2 and t1 ≥ 1, it follows from Lemma 5(2) that =[ + 1, ] = [c + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ] is an unsafe interval of A2 . (5) We claim that [Pj2∗ + 1, ∞) is an unsafe interval of A2 . We will show that [Pj1 + 1, Pj2+1 ] is an unsafe interval of A2 for any j ≥ j∗ , and then by Eq. (16), Ij2+1
[Pj2∗ + 1, ∞) ⊂ [Pj1∗ + 1, ∞) =
∞
Pj1+1
Pj2+1
[Pj1 + 1, Pj2+1 ]
j =j ∗
is an unsafe interval of A2 . Let Uj2 = [Pj1 + 1, Pj2+1 ]. We now show that Uj2 is an unsafe interval of A2 for any j ≥ j∗ = min{j∗1 , j∗2 }. We proceed by distinguishing two cases j∗1 ≤ j∗2 and j∗1 > j∗2 . (5.1) j∗1 ≤ j∗2 . Then j∗ = j∗1 . It follows from the result of (4) that Ij2 = [Pj1 + 1, Pj2 ] and Ij2+1 = [Pj1+1 + 1, Pj2+1 ] are unsafe intervals of A2 for any j ≥ 1. By the definition of j∗1 , we have j ≥ j∗ = j∗1 >
ms2 + s1 − 1
(m − 1)(s1 + s2 − t1 )
.
The condition s1 + s2 > t1 implies that ms2 + s1 − 1 < j(m − 1)(s1 + s2 − t1 ). Thus Pj2 + 1 − (Pj1+1 + 1) = (j − 1)(ms1 + ms2 + t1 ) + t1 + ms1 + 1 − j(mt1 + s1 + s2 ) − s1 − 1
= j(m − 1)(s1 + s2 − t1 ) − ms2 − s1 ≥ 0.
(22)
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
27
Then Uj2 = [Pj1 + 1, Pj2+1 ] = [Pj1 + 1, Pj2 ] ∪ [Pj1+1 + 1, Pj2+1 ] = Ij2 ∪ Ij2+1 . Hence Uj2 = [Pj1 + 1, Pj2+1 ] is an unsafe interval of A2 for any j ≥ j∗ . (5.2) j∗1 > j∗2 . Then j∗ = j∗2 . Note that
Uj2 = [Pj1 + 1, Pj2+1 ] = [Pj1−1 + 1 + (s1 + s2 ) + mt1 , Pj2 + m(s1 + s2 ) + t1 ].
(23)
Let a = Pj1−1 + 1, b = Pj2−1 , c = Pj1 + 1, d = Pj2 in Lemma 6. It follows from the result of (4) and j ≥ j∗ = j∗2 ≥ 2 that
[a, b] = [Pj1−1 + 1, Pj2−1 ] = Ij2−1 and [c , d] = [Pj1 + 1, Pj2 ] = Ij2 are an unsafe interval of A2 . By the definition of j∗2 , we have j ≥ j∗2 >
s1 + s2 − 1
(m − 1)(s1 + s2 − t1 )
+ 1.
The condition s1 + s2 > t1 implies that s2 + s1 − 1 < (j − 1)(m − 1)(s1 + s2 − t1 ). Thus for j ≥ j∗ = j∗2 ,
(b + 1 + (m − 1)s2 ) − c = Pj2−1 + 1 − (Pj1 + 1) + (m − 1)s2 = (j − 1)(m − 1)(s1 + s2 − t1 ) − (s1 + s2 ) ≥ 0,
(24)
and d − (a + (m − 1)(t1 − s2 )) = Pj2 − (Pj1−1 + 1) + (m − 1)(s2 − t1 )
= (j − 2)(m − 1)(s1 + s2 − t1 ) + (2m − 1)(s1 + s2 ) + 2t1 − 1 ≥ 0,
(25)
as j ≥ 2, m ≥ 2, s1 + s2 > t1 and t1 ≥ 1. It follows from Lemma 6 and Eqs. (23)–(25) that Uj2 = [a + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ] is an unsafe interval of A2 . Theorem 10. We consider one-pile misère Nim with Alliance-[2; 1] and s1 + s2 = t1 . By P (A1 ) and P (A2 ) we denote the sets of all unsafe positions of A1 and A2 , respectively. Then for m ≥ 2, P (A1 ) =
∞
[Pj2−1 + 1, Pj1 ],
j =1
P (A2 ) =
∞
[Pj1 + 1, Pj2 ],
j =1
where Pj1 and Pj2 are determined by Definition 8. Proof. Let Ij1 = [Pj2−1 + 1, Pj1 ] and Ij2 = [Pj1 + 1, Pj2 ] for j ≥ 1. (1) It follows from Eqs. (16) and (17) that both Ij1 = [Pj2−1 + 1, Pj1 ] and Ij2 = [Pj1 + 1, Pj2 ] are nonempty for any j ≥ 1, as s1 + s2 = t1 , j ≥ 1, m ≥ 2, s1 ≥ 1 and t1 ≥ 1. (2) We claim that P (A1 ) ∪ P (A2 ) = [1, ∞). Indeed, P (A1 ) ∪ P (A2 ) =
∞ ([Pj2−1 + 1, Pj1 ] ∪ [Pj1 + 1, Pj2 ]). j=1
(3) We show that Ij1 = [Pj2−1 + 1, Pj1 ] is an unsafe interval of A1 for any j ≥ 1. We proceed by induction on j. For j = 1,
I11
= [P02 + 1, P11 ] = [1, s1 ]. Given any position N ∈ [1, s1 ], the s1 players in A11 must take away all N counters and alliance
A1 loses. Suppose that Ij1 = [Pj2−1 + 1, Pj1 ] is an unsafe interval of A1 , we will show that Ij1+1 = [Pj2 + 1, Pj1+1 ] is an unsafe interval of A1 .
28
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
Table 3 The structures of P (A1 ) and P (A2 ) for s1 + s2 < t1 and m ≥ 2. j
1
2
3
···
j−1
P (A1 ) P (A2 )
[1 , s 1 ] [s1 + 1, ms1 + t1 ]
[P12 + 1, P21 ] [P21 + 1, P22 ]
[P22 + 1, P31 ] [P31 + 1, P32 ]
··· ···
[Pj2−2 + 1, Pj1−1 ] [Pj1−1 + 1, Pj2−1 ]
j
j
P (A1 ) P (A2 )
[ [
j+1
+ , ] + , ]
Pj2−1 Pj1
1 Pj1 1 Pj2
+ , + ,
Pj2 Pj1+1
[ [
1 Pj1+1 1 Pj2+1
]
]
···
q∗
··· ···
[Pq2∗ −1 + 1, Pq1∗ ] [Pq1∗ + 1, Pq2∗ ]
[Pq2∗ + 1, ∞)
Let a = Pj2−1 + 1 and b = Pj1 in Lemma 5(1). Then Pj2 + 1 = a + m(s1 + s2 ) + t1 and Pj1+1 = b + (s1 + s2 ) + mt1 . The conditions s1 + s2 = t1 and s1 ≥ 1 imply that b − (a + (m − 1)s2 ) = Pj1 − Pj2−1 − 1 − (m − 1)s2
= −(j − 1)(m − 1)(s1 + s2 − t1 ) + ms2 + s1 − 1 − (m − 1)s2 = s1 + s2 − 1 ≥ 0,
(26)
and b − (a + (m − 1)(s1 + s2 − t1 )) = Pj1+1 − (Pj2 + 1) = ms2 + s1 − 1 ≥ 0.
(27)
It follows from Lemma 5 (1) and Eqs. (26) and (27) that Ij1+1 = [Pj2 + 1, Pj1+1 ] is an unsafe interval of A1 .
(4) We show that Ij2 = [Pj1 + 1, Pj2 ] is an unsafe interval of A2 for any j ≥ 1. We proceed by induction on j. For j = 1,
I12 = [P11 + 1, P12 ] = [s1 + 1, ms1 + t1 ]. By the argument of (4) in Theorem 9, we conclude that I12 is an unsafe interval of A2 . Suppose that Ij2 = [Pj1 + 1, Pj2 ] is an unsafe interval of A2 . We will show that Ij2+1 = [Pj1+1 + 1, Pj2+1 ] is an unsafe interval of A2 . Let c = Pj1 + 1 and d = Pj2 in Lemma 5(2). Then Pj1+1 + 1 = c + (s1 + s2 ) + mt1 and Pj2+1 = d + m(s1 + s2 ) + t1 . The conditions s1 + s2 = t1 and t1 ≥ 1 imply that d − c − (m − 1)(t1 − s2 ) = t1 − 1 ≥ 0. It follows from Lemma 5(2) and Eq. (28) that Ij2+1 is an unsafe interval of A2 .
(28)
Theorem 11. We consider one-pile misère Nim with Alliance-[2; 1] and s1 + s2 < t1 . By P (A1 ) and P (A2 ) we denote the sets of all unsafe positions of A1 and A2 , respectively. Then for m ≥ 2, P (A1 ) =
q∗ [Pj2−1 + 1, Pj1 ] ∪ [Pq2∗ + 1, +∞), j=1
P (A2 ) =
q∗ [Pj1 + 1, Pj2 ], j =1 t −1
where q = ⌊ (m−1)(1t −s −s ) ⌋ + 1 and Pj1 , Pj2 are determined by Definition 8 (see Table 3). 1 1 2 ∗
Proof. Let Ij1 = [Pj2−1 + 1, Pj1 ] and Ij2 = [Pj1 + 1, Pj2 ] for j ≥ 1. (1) We show that Ij1 is nonempty for j ≥ 1. Indeed, Pj1 − (Pj2−1 + 1) = (j − 1)(mt1 + s1 + s2 ) + s1 − (j − 2)(ms1 + ms2 + t1 ) − t1 − ms1
= (j − 1)(m − 1)(t1 − s1 − s2 ) + ms2 + s1 − 1 ≥ s1 − 1 ≥ 0 , as j ≥ 1, m ≥ 2, t1 > s1 + s2 and s1 ≥ 1. We claim that Ij2 is nonempty for 1 ≤ j ≤ q∗ . In fact, by the definition of q∗ , m ≥ 2 and s1 ≥ 1, we have j ≤ q∗ ≤
t1 − 1 (m − 1)s1 + t1 − 1 +1≤ + 1. (m − 1)(t1 − s1 − s2 ) (m − 1)(t1 − s1 − s2 )
The condition s1 + s2 < t1 implies that
(m − 1)s1 + t1 − 1 ≥ (j − 1)(m − 1)(s1 + s2 − t1 ).
(29)
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
29
Thus Pj2 − (Pj1 + 1) = (j − 1)(ms1 + ms2 + t1 ) + ms1 + t1 − (j − 1)(s1 + s2 + mt1 ) − s1 − 1
= −(j − 1)(m − 1)(t1 − s1 − s2 ) + (m − 1)s1 + t1 − 1 ≥ 0.
(30)
(2) We claim that P (A1 ) ∪ P (A2 ) = [1, ∞). Indeed, q∗ P (A1 ) ∪ P (A2 ) = ([Pj2−1 + 1, Pj1 ] ∪ [Pj1 + 1, Pj2 ]) ∪ [Pq2∗ + 1, ∞). j =1
(3) Ij1 = [Pj2−1 + 1, Pj1 ] is an unsafe interval of A1 for any j ∈ {1, 2, . . . , q∗ }. We proceed by induction on j. For j = 1, = [P02 + 1, P11 ] = [1, s1 ]. Given any position N ∈ [1, s1 ], the s1 players in A11 must take away all N counters and alliance A1 loses. Suppose that Ij1 = [Pj2−1 + 1, Pj1 ] with j < q∗ is an unsafe interval of A1 . We will show that Ij1+1 = [Pj2 + 1, Pj1+1 ] is an unsafe interval of A1 . Let a = Pj2−1 + 1 and b = Pj1 in Lemma 5(1). Then Pj2 + 1 = a + m(s1 + s2 ) + t1 and Pj1+1 = b + (s1 + s2 ) + mt1 . Then we have
I11
b − (a + (m − 1)s2 ) = Pj1 − Pj2−1 − 1 − (m − 1)s2
= −(j − 1)(m − 1)(s1 + s2 − t1 ) + ms2 + s1 − 1 − (m − 1)s2 = (j − 1)(m − 1)(t1 − s1 − s2 ) + s1 + s2 − 1 ≥ 0,
(31)
and b − (a + (m − 1)(s1 + s2 − t1 )) ≥ b − a ≥ b − (a + (m − 1)s2 ) ≥ 0.
(32)
It follows from Lemma 5(1) and Eqs. (31) and (32) that = [a + m(s1 + s2 ) + t1 , b + (s1 + s2 ) + mt1 ] is an unsafe interval of A1 . (4) We will show that [Pq2∗ + 1, ∞) is an unsafe interval of A1 . If [Pj2−1 + 1, Pj1+1 ] is an unsafe interval of A1 for any j ≥ q∗ + 1, then by Eq. (29), Ij1+1
[Pq2∗ + 1, ∞) =
∞
[Pj2−1 + 1, Pj1+1 ]
j=q∗ +1
is an unsafe interval of A1 . Let Uj1 = [Pj2−1 + 1, Pj1+1 ]. We will show that Uj1 is an unsafe interval of A1 for any j ≥ q∗ + 1. Note that for j ≥ q∗ + 1 ≥ 2, Uj1 = [Pj2−1 + 1, Pj1+1 ] = [Pj2−2 + 1 + m(s1 + s2 ) + t1 , Pj1 + (s1 + s2 ) + mt1 ]. Let a = Pj2−2 + 1, b = Pj1−1 , c = Pj2−1 + 1 and d = Pj1 in Lemma 7.
It follows from the result of (3) and j ≥ q∗ + 1 ≥ 2 that [a, b] = [Pj2−2 + 1, Pj1−1 ] = Ij1−1 and [c , d] = [Pj2−1 + 1, Pj1 ] = Ij1 are unsafe intervals of A1 . By the definition of q∗ , we have j ≥ q∗ + 1 >
t1 − 1 + 1. (m − 1)(t1 − s1 − s2 )
The condition s1 + s2 < t1 implies that t1 − 1 < (j − 1)(m − 1)(t1 − s1 − s2 ). Thus b + 1 − (c + (m − 1)(s2 − t1 )) = (Pj1−1 + 1) − (Pj2−1 + 1) − (m − 1)(t1 − s2 ) = (j − 1)(m − 1)(t1 − s1 − s2 ) − t1
≥ 0.
(33)
The conditions j ≥ q + 1 ≥ 2, t1 > s1 + s2 and m ≥ 2 imply that ∗
d − (a + (m − 1)(s1 + s2 − t1 )) = Pj1 − (Pj2−2 + 1) − (m − 1)(s1 + s2 − t1 )
= (j − 1)(m − 1)(t1 − s1 − s2 ) + (m − 1)(t1 − s1 ) + s1 + s2 − 1 ≥ 0,
(34)
30
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
and b − (a + (m − 1)s2 ) = Pj1−1 − (Pj2−2 + 1) − (m − 1)s2 = (j − 2)(m − 1)(t1 − s1 − s2 ) + s1 + s2 − 1
≥ 0,
(35)
and d − (c + (m − 1)s2 ) = Pj1 − Pj2−1 − 1 − (m − 1)s2
= (j − 1)(m − 1)(t1 − s1 − s2 ) + s1 + s2 − 1 ≥ 0.
(36)
It follows from Lemma 7 and Eqs. (33)–(36) that Uj1 is an unsafe interval of A1 . (5) We show that Ij2 = [Pj1 + 1, Pj2 ] is an unsafe interval of A2 for any j ∈ {1, 2, . . . , q∗ }. We proceed by induction on j.
For j = 1, I12 = [P11 + 1, P12 ] = [s1 + 1, ms1 + t1 ]. By the argument of (4) in Theorem 9, we conclude that I12 is an unsafe interval of A2 . Suppose that Ij2 = [Pj1 + 1, Pj2 ] with j ≤ q∗ − 1 is an unsafe interval of A2 . We will show that Ij2+1 = [Pj1+1 + 1, Pj2+1 ] with j + 1 ≤ q∗ is an unsafe interval of A2 . Let c = Pj1 + 1 and d = Pj2 in Lemma 5(2). Then Pj1+1 + 1 = c + (s1 + s2 ) + mt1 and Pj2+1 = d + m(s1 + s2 ) + t1 . By the definition of q∗ , we have j + 1 ≤ q∗ ≤
t1 − 1
(m − 1)(t1 − s1 − s2 )
+ 1.
The condition s1 + s2 < t1 implies that t1 − 1 ≥ j(m − 1)(t1 − s1 − s2 ). Thus d − c − (m − 1)(t1 − s2 ) = Pj2 − (Pj1 + 1) + (m − 1)s2 − (m − 1)t1
= (j − 1)(m − 1)(s1 + s2 − t1 ) + (m − 1)s1 + t1 − 1 + (m − 1)s2 − (m − 1)t1 = −j(m − 1)(t1 − s1 − s2 ) + t1 − 1 ≥ 0. It follows from Lemma 5(2) and Eq. (37) that
Ij2+1
= [c + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ] is an unsafe interval of A2 .
(37)
Corollary 12. We consider one-pile misère Nim with Alliance-[1; 1]. By P (A1 ) and P (A2 ) we denote the sets of all unsafe positions of A1 and A2 , respectively. We define
Mj1 = (j − 1)mt1 + js1 , j ≥ 1, Mj2 = jms1 + jt1 , j ≥ 0.
Then for m ≥ 2, (1) If s1 > t1 then P (A1 ) =
g∗ [Mj2−1 + 1, Mj1 ], j =1
g∗ P (A2 ) = [Mj1 + 1, Mj2 ] ∪ [Mg2∗ + 1, +∞), j =1 s −1
where g ∗ = ⌊ (m−11)(s −t ) ⌋ + 1. 1 1 (2) If s1 = t1 then P (A1 ) =
∞ [Mj2−1 + 1, Mj1 ], j =1
∞ P (A2 ) = [Mj1 + 1, Mj2 ]. j =1
(38)
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
31
Fig. 8. The interval [1, 3] results in a new unsafe interval [3, 7] of A2 .
Fig. 9. N = 52 is an unsafe position of A2 .
(3) If s1 < t1 then P (A1 ) =
h∗ [Mj2−1 + 1, Mj1 ] ∪ [Mh2∗ + 1, +∞), j =1
h∗ P (A2 ) = [Mj1 + 1, Mj2 ], j =1
∗
t −1
where h = ⌊ (m−11)(t −s ) ⌋ + 1. 1 1 Proof. Let s2 = 0 in Theorems 9–11, we have Pj1 = Mj1 , Pj2 = Mj2 , and also j∗ = g ∗ , q∗ = h∗ .
4. Conclusions Remark 2. We consider one-pile misère bounded Nim with Alliance-[2; 1] and m = 2, i.e., the game Γ22,1 . Given n = 7 players P1 , P2 , P3 , P4 , P5 , P6 , P7 . Suppose that 4 players P1 , P2 , P6 , P7 form alliance A1 and the players P3 , P4 , P5 form alliance A2 , i.e., s1 = 2, t1 = 3 and s2 = 2. A. R. Kelly [12, Theorem 12] claimed that N = 52 is an unsafe position of A1 . But we claim that N = 52 is an unsafe position of A2 . Indeed, Fact 1. Suppose the game begins with N counters and the pile size before P3 begins to move is N ∗ ∈ [1, 3], then A2 must take these N ∗ counters away and lose. The interval [1, 3] results in a new unsafe interval [3, 7] of A2 . See Fig. 8. Fact 2. In Lemma 5(2), by letting c = 3 and d = 7 we conclude that [13, 18] is an unsafe interval of A2 . Similarly, [23, 29], [33, 40] and [43, 51] are unsafe intervals of A2 . (In Lemma 5(2), by letting c = 13 and d = 18, c = 23 and d = 29, c = 33 and d = 40, respectively.) Let c = 43 and d = 51 in Lemma 5(2), we conclude that [53, 62] is an unsafe interval of A2 . In other words, we cannot conclude that N = 52 is an unsafe position of A2 , only by Lemma 5(2). Fact 3. We claim that N = 52 is an unsafe position of A2 , see Fig. 9. On the other hand, letting a = 33, b = 40, c = 43 and d = 51 in Lemma 6, we conclude that [a + (s1 + s2 ) + mt1 , d + m(s1 + s2 ) + t1 ] = [43, 62] is an unsafe interval of A2 , i.e., N = 52 is an unsafe position of A2 . Why did Kelly [12, Theorem 12] claim that N = 52 is an unsafe position of A1 ? We claim that Fact 4. [1, 2] is an unsafe interval for A1 since A11 must take these counters away and lose. Fact 5. Suppose the game begins with N counters and the pile size before P6 begins to move is N ∗ ∈ [1, 4], then A1 must take these N ∗ counters away and lose. In this way, the interval [1, 4] results in an unsafe interval [8, 12] of A1 . See Fig. 10. Fact 6. By Lemma 5(1), the intervals [8, 12], [19, 22], [30, 32] result in new unsafe intervals [19, 22], [30, 32], [41, 42] of A1 , respectively. But the unsafe interval [41, 42] of A1 cannot produce a new unsafe interval of A1 by applying Lemma 5(1). In Fig. 11, Kelly used the following argument: For N − x1 − y1 − x2 ∈ [41, 42], we have N − x1 − y1 ∈ [41 + 4, 42 + 2] = [45, 44], and then N − x1 ∈ [45 + 3, 44 + 6] = [48, 50], and then N ∈ [48 + 4, 50 + 2] = [52, 52]. Note that [45, 44] is not a legal interval! In other words, Kelly omitted the condition Eq. (1) in Lemma 5(1).
32
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
Fig. 10. [8, 12] is an unsafe interval of A1 .
Fig. 11. The unsafe interval [41, 42] cannot produce a new unsafe interval of A1 .
Fig. 12. N = 17 is an unsafe position of A1 .
Remark 3. In [11], a more general structure of two alliances was investigated. But some conclusions were not correct. The faulty conclusions were caused by omitting the conditions of an unsafe interval resulting in a new and unsafe interval. For example, we consider one-pile misère bounded Nim with Alliance-[3; 3] and m = 2, i.e., the game Γ32,3 . Given n = 17 players and s1 = 3, t1 = 4, s2 = 3, t2 = 1, s3 = 3, t3 = 3. Kelly [11, Proposition 8] claimed that N = 17 is an unsafe position of A2 . Indeed, N = 17 is an unsafe position of A1 . See Fig. 12. Problem 1. For games Γ2m,1 and Γ1m,1 , all unsafe positions of alliances A1 and A2 are determined for any integers m ≥ 2 and s1 , s2 , t1 ≥ 1. Can we generalize these results to Γkm+1,k or Γkm,k for an arbitrary integer k > 1?
X. Zhao, W.A. Liu / Discrete Applied Mathematics 214 (2016) 16–33
33
Problem 2. The games of one-pile bounded misère Nim are investigated for Alliance-[2, 1] and Alliance-[1, 1]. Can we give the corresponding results under normal play convention? Can we generalize these results to Γkm+1,k or Γkm,k for an arbitrary integer k > 1? Acknowledgments The authors are grateful to the responsible editor and the anonymous referees for their valuable comments and suggestions, which have greatly improved the earlier version of this paper. The research was supported by the National Natural Science Foundation of China under Grants 11171368 and 11171094. The research was also supported by Program for Innovative Research Team (in Science and Technology) in University of Henan Province under Grant IRTSTHN(14IRTSTHN023). References [1] M.H. Albert, R.J. Nowakowski, The game of end-Nim, Electron. J. Combin. 8 (2001) ♯ R1, 1-12. [2] M.H. Albert, R.J. Nowakowski, Nim restrictions, Integers: Electron. J. Combin. Number Theory 4 (2004) ♯ G01, 1–10. [3] E.R. Berlekamp, J.H. Conway, R.K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1–4, second ed., A K Peters, Wellesley, MA, 2001–2004, vol. 1 (2001), vols. 2,3 (2003), vol. 4 (2004). [4] C.L. Bouton, Nim, a game with a complete mathematical theory, Ann. of Math. 3 (1905) 35–39. [5] J.H. Conway, On Numbers and Games, Academic Press, London, 1976. [6] E. Duchêne, A.S. Fraenkel, R.J. Nowakowski, M. Rigo, Extensions and restrictions of Wythoff’s game preserving its P-positions, J. Combin. Theory Ser. A 117 (2010) 545–567. [7] E. Duchêne, S. Gravier, Geometrical extensions of Wythoff’s game, Discrete Math. 309 (2009) 3595–3608. [8] A. Flammenkamp, A. Holshouser, H. Reiter, Dynamic one-pile blocking Nim, Electron. J. Combin. 10 (2003) ♯ N4, 1–6. [9] A.S. Fraenkel, M. Lorberbom, Nimhoff games, J. Combin. Theory Ser. A 58 (1991) 1–25. [10] A. Holshouser, H. Reiter, J. Rudzinski, Dynamic one-pile Nim, Fibonacci Quart. 41 (3) (2003) 253–262. [11] A.R. Kelly, Analysis of one pile misère Nim for two alliances, Rocky Mountain J. Math. 41 (6) (2011) 1895–1906. [12] A.R. Kelly, One-Pile misère Nim for three or more players, Int. J. Math. Math. Sci. 2006 (2006) Article ID 40796, 1–8. http://dx.doi.org/10.1155/IJMMS/2006/40796. [13] S.-Y.R. Li, N-person Nim and N-person Moore’s games, Internat. J. Game Theory 7 (1) (1977) 31–36. [14] W.A. Liu, H. Li, General restriction of (s, t )-Wythoff’s game, Electron. J. Combin. 21 (2) (2014) ♯ P2.44, 1–29. [15] W.A. Liu, H. Li, B. Li, A restricted version of Wythoff’s game, Electron. J. Combin. 18 (1) (2011) ♯ P207, 1–17. [16] W.A. Liu, X. Zhao, Adjoining to (s, t )-Wythoff’s game its P-positions as moves, Discrete Appl. Math. 179 (2014) 28–43.