Show Summary Details
More options …

# Open Mathematics

### formerly Central European Journal of Mathematics

Editor-in-Chief: Vespri, Vincenzo / Marano, Salvatore Angelo

IMPACT FACTOR 2018: 0.726
5-year IMPACT FACTOR: 0.869

CiteScore 2018: 0.90

SCImago Journal Rank (SJR) 2018: 0.323
Source Normalized Impact per Paper (SNIP) 2018: 0.821

Mathematical Citation Quotient (MCQ) 2018: 0.34

ICV 2018: 152.31

Open Access
Online
ISSN
2391-5455
See all formats and pricing
More options …
Volume 15, Issue 1

# A class of extensions of Restricted (s, t)-Wythoff’s game

Sanyang Liu
/ Haiyan Li
Published Online: 2017-03-20 | DOI: https://doi.org/10.1515/math-2017-0022

## Abstract

Restricted (s, t)-Wythoff’s game, introduced by Liu et al. in 2014, is an impartial combinatorial game. We define and solve a class of games obtained from Restricted (s, t)-Wythoff’s game by adjoining to it some subsets of its P-positions as additional moves. The results show that under certain conditions they are equivalent to one case in which only one P-position is adjoined as an additional move. Furthermore, two winning strategies of exponential and polynomial are provided for the games.

MSC 2010: 91A46

## 1 Introduction

All our games in this paper are 2-player impartial combinatorial games played on two piles of finitely many tokens. All the information about the games is available to both players; there is no difference between the moves allowed to each player, and there are no chance moves (such as dice); and the game must end at some position with a clear winner, i.e., without ties or draws. In normal play the player who makes the last move wins and the opponent loses.

In general, a position is called a P-position from which the Previous player can force a win, otherwise it is an N-position from which the Next player can win regardless of the opponent’s moves. The sets of all P-and N- positions of a game are denoted by 𝓟 and 𝓝, respectively. For a position u, by F(u) we denote the set of all its followers, i.e., all positions attainable by a legitimate move from u. Then it follows from the definition of P-and N-positions that the following relationship between 𝓟 and 𝓝 holds (it is well explained in [1, 2]): $u∈P⟺F(u)⊆N(stability property ofP-positions)u∉P⟺u∈N⟺F(u)∩P≠∅(absorbing property ofP-positions)$ The sets of P-and N-positions of any game are uniquely determined by these two properties.

For example, Wythoff’s game over a hundred years old is exactly a famous impartial game, in which players can remove any positive number of tokens from a single pile, or the same number of tokens from both piles. In normal play, the player who is first unable to move loses. Various generalizations and results on this game were done by Berlekamp et al. [3], Duchěne and Gravier [4], Fraenkel [5, 6], Fraenkel and Borosh [7], Fraenkel and Zusman [8], Liu and Li [9], Li et al. [10].

We next describe two variants: (s, t)-Wythoff’s game and Restricted (s, t)-Wythoff’s game. By ℤ0 and ℤ+ we denote the set of nonnegative integers, and positive integers, respectively. Let ℤeven = {2n : n ∈ ℤ0}, ℤodd = {2n + 1:n ∈ ℤ0.

Consider two parameters s, t ∈ ℤ+ and two piles of finitely many tokens. In (s, t)-Wythoff’s game [6], a player may either remove any positive number of tokens from one pile or remove tokens from both piles, k > 0 from one pile and > 0 from the other, say ≥ k, subject to the constraint $0≤ℓ−k<(s−1)k+t.$(1)

Throughout the paper, we consider the games in normal play, i.e., the player making the last move wins. Notice that the case s = t = 1 is Wythoff’s game, and the case s = 1, t ≥ 1 is Generalized Wythoff [5].

In Restricted (s, t)-Wythoff [9], two types of moves are as follows:

Type I Remove k tokens with 0 < k ∈ ℤeven from a single pile;

Type II Remove 0 < k ∈ ℤeven tokens from one pile and 0 < ∈ ℤeven from the other simultaneously, also constrained by the condition (1).

It was proved in [9] that the set of P-positions of Restricted (s, t)-Wythoff are given by four sequences of pairs of integers $\begin{array}{}\mathcal{P}=\left\{\left({A}_{n}^{\prime },{B}_{n}^{\prime }\right),\left({A}_{n}^{\prime },{B}_{n}^{\prime }+1\right),\left({A}_{n}^{\prime }+1,{B}_{n}^{\prime }\right),\left({A}_{n}^{\prime }+1,{B}_{n}^{\prime }+1\right){\right\}}_{n\ge 0}\end{array}$ such that $An′=mex{Ai′,Ai′+1, Bi′,Bi′+1:0≤i(2) where mex S = min(ℤ0 \ S)= minimal excluded value of the set S, in particular, mex ∅ = 0; and δt = 1 if t is odd, δt = 0 if t is even.

For every n ≥ 0, we call the pair $\begin{array}{}\left({A}_{n}^{\prime },{B}_{n}^{\prime }\right)\end{array}$ a P-generator of P-positions, since it generates the set $\begin{array}{}\left\{\left({A}_{n}^{\prime },{B}_{n}^{\prime }\right),\left({A}_{n}^{\prime }+1,{B}_{n}^{\prime }\right),\left({A}_{n}^{\prime },{B}_{n}^{\prime }+1\right),\left({A}_{n}^{\prime }+1,{B}_{n}^{\prime }+1\right)\right\}\end{array}$ of P-positions.

In [11], Fraenkel et al. adjoined to Generalized Wythoff some appropriate subsets of its P-positions as additional moves, obtaining some interesting games. This idea of “adjoin some P-positions as moves” has also been exploited in [12] to examine (s, t)-Wythoff’s game, resulting in some generalizations of those in [11]. This observation enables us to examine Restricted (s, t)-Wythoff in this paper.

We define four games, Γ1, Γ2, Γ3, Γ4, generated from Restricted (s, t)-Wythoff by adjoining to it subsets of its P-generators $\begin{array}{}\bigcup _{n\in {Q}_{i}}\left({A}_{n}^{\prime },{B}_{n}^{\prime }\right)\end{array}$ as additional moves for i ∈ {1, 2, 3, 4 }. In addition to the moves of Type I and II, a player in Γi has a Type III move, i.e., remove $\begin{array}{}{A}_{n}^{\prime }\end{array}$ from one pile and $\begin{array}{}{B}_{n}^{\prime }\end{array}$ from the other for some nQi.

More specifically, we let Q1 = {1}, i.e., Γ1 is obtained from Restricted (s, t)-Wythoff by adjoining to it the P-generator $\begin{array}{}\left({A}_{1}^{\prime },{B}_{1}^{\prime }\right)=\left(2,2s+t+{\delta }_{t}\right)\end{array}$ as the only Type III move. Put Q2 = ℤ+, thus in Γ2 all the nonzero P-generators of Restricted (s, t)-Wythoff are added as Type III moves. In Γ3, let Q3 = ℤ+\ {3+(t+δt)/2}. Finally, we define Γ4 with Q4 = ℤ+\ {2+(t+δt)/2}.

Each of our games is an infinite class of games, since they also depend on two parameters s and t as in Restricted (s, t)-Wythoff. But for every fixed s and t, each Γi is a single game.

In Section 2, some results useful throughout the paper are proved. Our main results are enunciated in Sections 3 and 4. Theorem 3.1 of Section 3 gives a recursive characterization of the P-positions of Γ1 for 2s + t + δt > 4, which provides an exponential time winning strategy for Γ1. Theorem 3.5 and Corollary 3.6, together with a special numeration system, provide a polynomial time winning strategy for Γ1.

In Section 4, Theorem 4.5 shows that for (s = 1, t ∈ {3, 4}) or (s = 2, t ≥ 1), Γ1 and Γ2 are equivalent; Theorem 4.6 shows that for s = 1 and t > 4, Γ1 and Γ3 are equivalent; and in Theorem 4.7 we prove that for s ≥ 3 and t + δt ≥ 2s − 2, Γ1 and Γ4 are equivalent. Final section provides the conclusions and some relevant open problems.

## 2 Preliminary

Let $\begin{array}{}{A}^{\prime }=\bigcup _{i=1}^{\mathrm{\infty }}{A}_{i}^{\prime }\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}^{\prime }=\bigcup _{i=1}^{\mathrm{\infty }}{B}_{i}^{\prime },\end{array}$ where $\begin{array}{}{A}_{n}^{\prime }\end{array}$ and $\begin{array}{}{B}_{n}^{\prime }\end{array}$ are defined in Eq. (2). From Lemma 12 of [9], A′ ∩ B′ = ∅, A′ ∪ B′ = ℤeven\ {0}, and for every n > m ≥ 0, $\begin{array}{}{B}_{n+1}^{\prime }>{B}_{n}^{\prime }>{A}_{n}^{\prime }>{A}_{m}^{\prime }.\end{array}$

#### Lemma 2.1

For all n ∈ ℤ+, $\begin{array}{}{A}_{n}^{\prime }-{A}_{n-1}^{\prime }\in \left\{2,4\right\},{B}_{n}^{\prime }-{B}_{n-1}^{\prime }\end{array}$ ∈ {2s + t +δt,\ 4s + t + δt}. Moreover, $\begin{array}{}{B}_{n}^{\prime }-{B}_{n-1}^{\prime }=2s+t+{\delta }_{t}\end{array}$ if and only if $\begin{array}{}{A}_{n}^{\prime }-{A}_{n-1}^{\prime }=2;{B}_{n}^{\prime }-{B}_{n-1}^{\prime }=4s+t+{\delta }_{t}\end{array}$ if and only if $\begin{array}{}{A}_{n}^{\prime }-{A}_{n-1}^{\prime }=4.\end{array}$

#### Proof

Clearly $\begin{array}{}0<{A}_{n}^{\prime }-{A}_{n-1}^{\prime }\in {\mathbb{Z}}^{even}.\end{array}$ Now suppose $\begin{array}{}{A}_{n}^{\prime }-{A}_{n-1}^{\prime }\ge 6.\end{array}$ Then we have $\begin{array}{}{A}_{n-1}^{\prime }<{A}_{n-1}^{\prime }+2<{A}_{n-1}^{\prime }+4<{A}_{n}^{\prime }=\text{mex}\left\{{A}_{i}^{\prime },{A}_{i}^{\prime }+1,{B}_{i}^{\prime },{B}_{i}^{\prime }+1:0\le i Thus $\begin{array}{}{A}_{n-1}^{\prime }\end{array}$ +2 and $\begin{array}{}{A}_{n-1}^{\prime }\end{array}$ + 4 are in the set $\begin{array}{}\left\{{A}_{i}^{\prime },{A}_{i}^{\prime }+1,{B}_{i}^{\prime },{B}_{i}^{\prime }+1:0\le i Now A′ and B′ are disjoint, thus the only possibility is that both $\begin{array}{}{A}_{n-1}^{\prime }\end{array}$ + 2 and $\begin{array}{}{A}_{n-1}^{\prime }\end{array}$ + 4 are in B′, i.e., the gap between the adjacent elements in B′ can be 2, which contradicts the fact that $\begin{array}{}{B}_{n}^{\prime }-{B}_{n-1}^{\prime }\in \left\{2s+t+{\delta }_{t},4s+t+{\delta }_{t}\right\}.\end{array}$ Hence, $\begin{array}{}{A}_{n}^{\prime }-{A}_{n-1}^{\prime }\in \left\{2,4\right\}.\end{array}$ The remaining part is directly from the definition of $\begin{array}{}{B}_{n}^{\prime }\end{array}$ and the above. □

#### Lemma 2.2

For every n > m ≥ 0, 2(nm) ≤ $\begin{array}{}{A}_{n}^{\prime }-{A}_{m}^{\prime }\le 4\left(n-m\right).\end{array}$ In particular, letting m = 0, gives 2n$\begin{array}{}{A}_{n}^{\prime }\end{array}$ ≤4n.

#### Proof

By Lemma 2.1, 2(nm) ≤ $\begin{array}{}{A}_{n}^{\prime }-{A}_{m}^{\prime }=\sum _{j=m}^{n-1}\left({A}_{j+1}^{\prime }-{A}_{j}^{\prime }\right)\le 4\left(n-m\right).\end{array}$ □

#### Lemma 2.3

Let ϕn = $\begin{array}{}{A}_{n}^{\prime }\end{array}$ − 2n. For r ∈ ℤ0, $ϕj=2r⇔Br′(3) In particular, for fixed integer parameters s, t with 2s + t + δt > 4, then $\begin{array}{}{A}_{j}^{\prime }=2j\end{array}$ if and only if 2 ≤ 2j ≤ 2s + t + δt − 2, and $\begin{array}{}{A}_{j}^{\prime }=2j+2\end{array}$ if and only if 2s + t + δt ≤ 2 j ≤ 4s + 2t + 2δt − 4.

#### Proof

Let S = {x : 0 < x≤ $\begin{array}{}{A}_{j}^{\prime }\end{array}$ , and x ∈ ℤeven. By ♯(S) we denote the number of elements of the set S. Put $\begin{array}{}\mathrm{♯}{A}^{\prime }=\mathrm{♯}\left({A}^{\prime }\cap S\right)\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\mathrm{♯}{B}^{\prime }=\mathrm{♯}\left({B}^{\prime }\cap S\right).\end{array}$ Since A′ ∩ B′ = ∅, A′ ∪ B′ = ℤeven\ {0}, it is easy to derive that ♯ A′ + ♯ B′ = ♯(S) = $\begin{array}{}{A}_{j}^{\prime }/2,\mathrm{♯}{A}^{\prime }=j,\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and so}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\mathrm{♯}{B}^{\prime }={A}_{j}^{\prime }/2-j.\end{array}$

Assume r is exactly the largest index such that $\begin{array}{}{B}_{r}^{\prime }<{A}_{j}^{\prime }.\end{array}$ Now $\begin{array}{}{B}_{n}^{\prime }\end{array}$ is a strictly increasing sequence. Thus ♯B′ = r. Therefore, $ϕj=Aj′−2j=2♯B′=2r⇔Br′

From Eq. (2), $\begin{array}{}{A}_{0}^{\prime }={B}_{0}^{\prime }=0,{A}_{1}^{\prime }=\text{mex}\left\{0,1\right\}=2,\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{1}^{\prime }=2s+t+{\delta }_{t}.\end{array}$ For 2s + t + δt > 4, we obtain $\begin{array}{}{A}_{2}^{\prime }=\text{mex}\left\{0,1,2,3,2s+t+{\delta }_{t},2s+t+{\delta }_{t}+1\right\}=4,\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and then}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{2}^{\prime }=4s+2t+2{\delta }_{t}.\end{array}$ The rest of the proof is obtained by letting r = 0 and r = 1 in Eq. (3), respectively. □

Symmetry of our game rules implies that a game position (a, b) is identical to (b, a) . Clearly, the P-generators added to Restricted (s, t)-Wythoff alter the set of P-positions of Restricted (s, t)-Wythoff. But the set of P-positions of each Γi, i ∈ {1, 2, 3, 4 }, is still four sequences of pairs of integers. Denote by {(An, Bn), (An, Bn + 1), (An + 1, Bn), (An + 1, Bn + 1)}n≥ 0 the set of Γi, and for any n ∈ ℤ0, An, Bn ∈ ℤeven, AnAn+1 and AnBn. Like in Restricted (s, t)-Wythoff, the pair (An, Bn) is a P-generator of P-positions in each Γi.

#### Lemma 2.4

For every n > m ≥ 0, Bn+1 > Bn > An > Am.

#### Proof

First, by the notations above, AnAm and BnBm. Suppose An = Am, this implies BnBm, or else, (An, Bn) = (Am, Bm), impossible. So if Bn > Bm, then there is a move (An, Bn)→(Am, Bm) (Type I, and k = BnBm ∈ ℤeven), but it contradicts stability property of P-positions. Now suppose Bn < Bm, then (Am, Bm)→(An, Bn), resulting in another contradiction. Thus An > Am. Similarly, Bn > Bm.

We prove below An < Bn. Again by the notations, AnBn. If An = Bn for some n ∈ ℤ+, then we can move (An, Bn)→(0,0) (Type II, satisfies condition (1)), another contradiction. Therefore, Bn+1 > Bn > An > Am. □

#### Lemma 2.5

Put $\begin{array}{}A=\bigcup _{i=1}^{\mathrm{\infty }}{A}_{i}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}and\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}B=\bigcup _{i=1}^{\mathrm{\infty }}{B}_{i}.\end{array}$ Then AB = ∅, and AB = ℤeven\ {0}.

#### Proof

We first show AB = ∅. Suppose An = Bm for some m, n ∈ ℤ+. By Lemma 2.4, mn, and Bn > An = Bm > Am. Thus there is a move of Type I that (An, Bn)→(Am, Bm) with BnAm, which is impossible.

Clearly A0 = B0 = 0, and AB ⊆ ℤeven\ {0}. Suppose there exists u ∈ ℤeven\ {0} but uAB. Thus for every v ∈ ℤeven, $\begin{array}{}\left(u,v\right)\notin \bigcup _{i=1}^{\mathrm{\infty }}\left({A}_{i},{B}_{i}\right),\end{array}$ that is, (u, v) is an N-position. We show below that there exists some v0 ∈ ℤeven such that (u, v0) is not an N-position, by proving F(u, v0)∩ 𝓟 = ∅, i.e., no follower of (u, v0) is a P-position.

Let n0 be the largest index such that An0 < u. Then from (u, v) we can move to (Ai, Bi) only for some in0. In particular, let m0 = j be the largest index of Type III move $\begin{array}{}\left({A}_{j}^{\prime },{B}_{j}^{\prime }\right)\end{array}$ from (u, v) . More concretely, $m0=1forΓ1,max{i:Ai′≤u,}forΓ2,max{i:Ai′≤u,i≠3+(t+δt)/2}forΓ3,max{i:Ai′≤u,i≠2+(t+δt)/2}forΓ4.$

Now Let D = max{Bi: in0} + 2, and v0 = D + su(t + 1). Note that v0 ∈ ℤeven. It is obvious that from (u, v0) we cannot lead to any position of the form (Ai + 1, Bi), (Ai, Bi + 1) or (Ai + 1, Bi + 1). So it suffices to prove that from (u, v0) none of Type I, II and III moves leads to (Ai, Bi) with in0.

For every in0, v0 > max{Bi: in0} ≥ Bi > Ai. Then v0$\begin{array}{}\bigcup _{i=1}^{{n}_{0}}\end{array}$ Ai$\begin{array}{}\bigcup _{i=1}^{{n}_{0}}\end{array}$ Bi. We know u$\begin{array}{}\bigcup _{i=1}^{{n}_{0}}\end{array}$ Ai$\begin{array}{}\bigcup _{i=1}^{{n}_{0}}\end{array}$ Bi. Hence, we cannot move from (u, v0) to any (Ai, Bi) with in0 by a move of Type I.

For all in0, we have k = uAi > 0, = v0Bi = DBi + su(t + 1)> uAi = k, and k = DBi + (s − 1)u + Ai + sut > (s − 1)(uAi)+ t = (s − 1)k + t. Therefore, no move of Type II from (u, v0) leads to (Ai, Bi), in0.

Finally, we consider the move of Type III. By Lemma 2.2, $\begin{array}{}{A}_{n}^{\prime }\ge 2n,\end{array}$ and so $Bm0′=sAm0′+(t+δt)m0≤sAm0′+(t+δt)AmO′/2≤sAm0′+tAm0′≤su(t+1),$ by virtue of $\begin{array}{}\left(t+{\delta }_{t}\right)/2\le \phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}t\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}u\ge {A}_{{m}_{0}}^{\prime }.\end{array}$ By the above, $\begin{array}{}\left({A}_{{m}_{0}}^{\prime },{B}_{{m}_{0}}^{\prime }\right)\end{array}$ is the maximum Type III move from (u, v0). However, $\begin{array}{}{v}_{0}-{B}_{{m}_{0}}^{\prime }=D+su\left(t+1\right)-{B}_{{m}_{0}}^{\prime }\ge D>{B}_{i}>{A}_{i}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{for every}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}i\le {n}_{0}.\end{array}$ Therefore, no move of Type III from (u, v0) can lead to a P-position.

In conclusion, uAB, and then AB = ℤeven\ {0}. □

## 3 Two winning strategies for Γ1

Obviously, (0,0), (0,1), (1,0) and (1,1) are P-positions in Restricted (s, t)-Wythoff, and so are they in Γ1. Since now $\begin{array}{}\left({A}_{1}^{\prime },{B}_{1}^{\prime }\right)\end{array}$ is a legal move of Type III, the P-position $\begin{array}{}\left({A}_{1}^{\prime },{B}_{1}^{\prime }\right)\end{array}$ =(2,2s + t + δt) in Restricted (s, t)-Wythoff is no longer a P-position in Γ1, nor $\begin{array}{}\left({A}_{1}^{\prime }+1,{B}_{1}^{\prime }\right),\left({A}_{1}^{\prime },{B}_{1}^{\prime }+1\right)\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{or}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\left({A}_{1}^{\prime }+1,{B}_{1}^{\prime }+1\right).\end{array}$ It is easily seen that this additional move for Restricted (s, t)-Wythoff alters the original P-positions.

#### Theorem 3.1

Given s, t ∈ ℤ+ with 2s + t + δt > 4. For Γ1, $\begin{array}{}\mathcal{P}=\bigcup _{n=0}^{\mathrm{\infty }}\left\{\left({A}_{n},{B}_{n}\right),\left({A}_{n},{B}_{n}+1\right),\left({A}_{n}+1,{B}_{n}\right),\left({A}_{n}+1,{B}_{n}+1\right)\right\},\end{array}$ where for n ≥ 0, $An=mex{Ai,Ai+1,Bi,Bi+1:0≤i(4)

#### Example 3.2

For s = 2, t ∈ {3, 4}, we display the first few P-generators of Γ1 in the table below, which show us how to determine 𝓟 by using Eq. (4).

Table 1

The first few P-generators of Γ1 for s = 2 and t ∈ {3, 4}.

#### Proof

Notice first that the condition 2s + t + δt > 4 implies that the case s = 1, t ∈ {1, 2 } is not covered. Thus we have either (s = 1, t > 2) or (s > 1, t ≥ 1).

For s = 1 and t > 2, the game was solved in [13], where Theorem 10 is precisely our assertion. But the structure of P-positions of the game is of algebraic form, which provides a poly-time winning strategy for our game. In addition, the methods of proof in [13] are totally different from those for the case s > 1 and t ≥ 1 in this paper.

For s > 1 and t ≥ 1, before we give the proof, some useful properties of the sequences An and Bn are required. Analysis similar to that in the proof of Lemmas 2.1 and 2.2 shows that for every n > m ≥ 0, we have $\begin{array}{}\left(i\right)2\left(n-m\right)\le {A}_{n}-{A}_{m}\le 4\left(n-m\right),\left(ii\right){A}_{n}-{A}_{n-1}\in \left\{2,4\right\},\left(iii\right){B}_{n}-{B}_{n-1}\in \left\{2s+t+{\delta }_{t}+2,4s+t+{\delta }_{t}\right\}.\end{array}$ Particularly, BnBn− 1 = 2s + t + δt + 2 if and only if AnAn − 1 = 2, BnBn − 1 = 4s + t + δt if and only if AnAn − 1 = 4.

Let A = $\begin{array}{}\bigcup _{i=1}^{\mathrm{\infty }}\end{array}$ Ai and B = $\begin{array}{}\bigcup _{i=1}^{\mathrm{\infty }}\end{array}$ Bi, then by Lemma 2.5 we have the fact that AB = ∅ and AB = ℤeven\ {0}.

Now it suffices to show two things:

1. Every move from a position u ∈ 𝓟 cannot terminate in 𝓟.

2. From every position v ∉ 𝓟, there exists alegal move vu ∈ 𝓟.

#### Proof of I

Let (x, y) with xy be a position in 𝓟. Assume that a move from (x, y) leads to another position in 𝓟. Since An, Bn ∈ ℤeven and so An + 1, Bn + 1 ∈ ℤodd, considering our game rules, we have eight possible moves for n > m ≥ 0: $(An,Bn)→(Am,Bm),(An+1,Bn)→(Am+1,Bm),(An,Bn+1)→(Am,Bm+1),(An+1,Bn+1)→(Am+1,Bm+1),(An,Bn)→(Bm,Am),(An+1,Bn)→(Bm+1,Am),(An,Bn+1)→(Bm,Am+1),(An+1,Bn+1)→(Bm+1,Am+1).$

Now none of them could be a Type I move, since An and Bn are strictly increasing sequences.

They cannot be moves of Type II either. Indeed, for the first four cases, clearly n > m ≥ 0, and we have $ℓ−k=(Bn−Bm)−(An−Am)=(s−2)(An−Am)+(t+δt+4)(n−m)≥(s−1)(An−Am)+(4(n−m)−(An−Am))+t+δt≥(s−1)k+t,$ which contradicts Eq. (1). Next consider the last four cases. For every s > 1, t ∈ ℤ+ and every n ∈ ℤ0, we have Bn = (s − 1)An + (t + δt + 4)n > An. And by above, for every n > m ≥ 0, BnBms(AnAm)+2 > AnAm. It follows that BnAmBnBm>AnAmAnBm. Thus for these four cases, we have $\begin{array}{}{k}^{\prime }={A}_{n}-{B}_{m}\le {A}_{n}-{A}_{m}=k,{\ell }^{\prime }={B}_{n}-{A}_{m}\ge {B}_{n}-{B}_{m}=\ell ,\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{\ell }^{\prime }-{k}^{\prime }\ge \ell -k\ge \left(s-1\right)k+t\ge \left(s-1\right){k}^{\prime }+t,\end{array}$ a contradiction.

It remains to consider the one and only Type III move $\begin{array}{}\left({A}_{1}^{\prime },{B}_{1}^{\prime }\right)\end{array}$ =(2,2s+ t +δt). For the first four cases, note that AnAm = 2 implies nm = 1. Then we get $B1′=Bn−Bm=(s−1)(An−Am)+(t+δt+4)(n−m)=2s+t+δt+2>B1′,$ a contradiction. For the remaining four cases, if AnBm = $\begin{array}{}{A}_{1}^{\prime }\end{array}$ =2 and BnAm = $\begin{array}{}{B}_{1}^{\prime }\end{array}$ = 2s+ t +δt. Now AnAm ≥ 2(nm) ≥ 2. Then $\begin{array}{}{A}_{1}^{\prime }+{B}_{1}^{\prime }\end{array}$ = BnBm + AnAm = s(AnAm) + (t + δt + 4)(nm) ≥ 2s+ t +δt + 4, which is impossible. Hence, any one of the hypothetical moves above cannot be a Type III move, ending the proof of I.

#### Proof of II

Without loss of generality, let (x, y) with xy be a position not in 𝓟.

If x ∈ {0, 1}, then we move yδy, since clearly yδy is even. In what follows, suppose x ≥ 2. Now AB = ∅ and AB = ℤeven\ {0}. So x appears exactly once in exactly one of $\begin{array}{}\bigcup _{n=1}^{\mathrm{\infty }}\end{array}$ {An} ∪ $\begin{array}{}\bigcup _{n=1}^{\mathrm{\infty }}\end{array}$ {An + 1} and $\begin{array}{}\bigcup _{n=1}^{\mathrm{\infty }}\end{array}$ {Bn} ∪ $\begin{array}{}\bigcup _{n=1}^{\mathrm{\infty }}\end{array}$ {Bn + 1}. Thus we have one of the following two cases:

Case (i) x = Bn or Bn + 1, for some n ∈ ℤ+. Then yxBn > An + 1 ≥ An + δy, thus move yAn + δy since yAnδy is even.

Case (ii) x = An or An + 1, for some n ∈ ℤ+. In this case, we have y > Bn + 1 or xy < Bn. If y > Bn + 1, then move yBn + δy since 0 < yBnδy∈ ℤeven. If xy <Bn, we distinguish the following three subcases:

(ii. 1) y = Bn−1 or Bn−2. We know AnAn−1 ∈ {2, 4} for all n ∈ ℤ+. If AnAn−1 = 2, then BnBn−1 = 2s + t + δt + 2. We move (x, y)→(x−2, y−2stδt) by a move of Type III, with k = ${A}_{1}^{\prime }$ = 2, = ${B}_{1}^{\prime }$ = 2s + t + δt. Notice that x−2 = An−1 or An−1 + 1, and y−2stδt = Bn−1 or Bn−1 + 1. Hence, (x − 2, y − 2stδt)∈ 𝓟.

If AnAn−1 = 4, then BnBn−1 = 4s + t + δt. We move (x, y)→(x−4, y−4stδt + 2), Which is a legal move of Type II: First, it is easy to see that x−4 = An−1 or An−1 + 1, and y−4stδt + 2=Bn−1 or Bn−1 + 1. Thus (x−4, y−4stδt + 2)∈ 𝓟. Secondly, k = 4, = 4s + t + δt−2, and 0 < k = 4s + t + δt−2 < sk + t, which satisfies Eq. (1).

(ii.2) xy < sAn + t + δt. In this subcase, we move (x, y)→(xAn, δy)∈ 𝓟. This is a move of Type II, with k = An and = yδy. Indeed, both k and are even, then 0 < k = Anyδy = . And sAn + t + δt is even, which implies yδysAn + t + δt−2, and so k = yδyAn ≤ (s−1)An + t + δt−2 < (s−1)k + t.

(ii.3) sAn + t + δty < Bn−2. Put $m=y−(s−1)An−2n+2−δyt+δt+2,$ where ⌊ x ⌋ denotes the largest integer ≤ x. Then move (x, y)→(xAn + Am, Bm + δy)∈ 𝓟 by a move of Type II, which is legal:

First, k = AnAm and = yBmδy are even. Next we have (a) k > 0, (b) k > 0, (c) < sk + t. Indeed,

1. Since An ≥ 2n, we have y−(s−1)An−2n + 2−δy≥sAn + t + δt−(s−1)An−2n + 2>0, thereby m ≥ 0. On the other hand, y−(s−1)An−2n + 2−δy<Bn−(s−1)An−2n = (t + δt + 2)n, so 0 ≤ m < n. Thus k = AnAm > 0.

2. By the definition of m, we have $m≤y−(s−1)An−2n+2−δyt+δt+2,$ so y ≥(t + δt + 2)m + (s−1)An + 2n−2 + δy. By (a) n>m and s>1, we get $ℓ=y−Bm−δy≥(t+δt+2)m+(s−1)An+2n−2−(s−1)Am−(t+δt+4)m=(s−1)(An−Am)+2(n−m)−2≥(s−1)k≥k>0.$

3. By the definition of m, we have $y−(s−1)An−2n+2−δyt+δt+2−1 i.e., yδy < (t + δt + 2)(m + 1) + (s−1)An + 2n−2. Further, note that both sides of this inequality are even, then yδy ≤ (t + δt + 2)(m + 1) + (s−1)An + 2n−4. It follows from 2(nm) ≤ (AnAm) that $ℓ=y−Bm−δy≤(t+δt+2)(m+1)+(s−1)An+2n−4−(s−1)Am−(t+δt+4)m=(s−1)(An−Am)+t+δt+2(n−m)−2≤s(An−Am)+t+δt−2

The proof is completed. □

Theorem 3.1 provides a recursive winning strategy in terms of the mex function, which is exponential in the input size log xy of any game position (x, y)∈ ℤ0× ℤ0. For more theory of computing complexity of heap games, see [6]. Next, the central question we address here is whether our game has a better strategy, such as a polynomial time winning strategy.

We introduce a numeration system that turns out to be relevant to our game Γ1. For fixed integers s > 1 and t ≥1, let u−1 = 2/(s−1), u0 = 2, and put un = (s + ⌈ t/2⌉)un−1 + (s−1)un−2(n ≥ 1). Here and subsequently, ⌈ x ⌉ stands for the smallest integer ≥ x. Denote by 𝒰 the numeration system with bases u0, u1,… and digits di∈{0, 1,…, s + ⌈ t/2 ⌉}. Note that an integer such as un has two representations: un itself and (s + ⌈ t/2⌉)un−1 + (s−1)un−2. Since we would like to have uniqueness of representation, it is natural to stipulate that di = s + ⌈ t/2⌉ ⟹ di−1 < s−1 (i ≥ 1). Then we claim two facts:

1. For every n ≥1, un∈ ℤeven, clearly by induction on n.

2. Every decimal number N ∈ ℤeven has a unique representation R(N) over 𝒰. This is a special case of Theorem 3 in [14]. Note that the greedy algorithm of repeatedly dividing N or its remainder by the largest ui not exceeding this remainder gives the unique representation.

Those whose representations R(N) end in an even number of 0s are called vile numbers, and those whose representations R(N) end in an odd number of 0s are called dopey numbers (for an etymology of the terms vile, dopey, see [15]). In addition, by LR(N) we denote the “left shift” of R(N), i.e., LR(N) is obtained from R(N) by adjoining 0 to the right end of R(N).

#### Example 3.3

We consider Γ1 of Example 3.2, where s = 2, t∈ {3, 4}, and so ⌈ t/2⌉ = 2. Thus, u−1 = 2, u0 = 2, u1 = 10, u2 = 42, u3 = 178, …. The representations R(N) over 𝒰 of the first few numbers N∈ ℤeven appear in Table 2.

Table 2

Representations R(N) with N ∈ ℤeven over 𝒰.

A question we just might ask at this point is what the connection is between Tables 1 and 2. By scanning the first few entries of both tables, we may be tempted to conclude that all Ans in Table 1 are vile, also it seems that all Bns are dopey. Moreover, we consider a P-generator say (12, 52) in Γ1 with representations R(12, 52) = (11, 110). It is obvious that LR(12) = L(11) = 110 = R(52). Now consider an N-position (20, 84) in Γ1, whose representations are R(20, 84) = (20, 200), we also have LR(20) = R(84). Therefore, it appears that there is no causal relation between the facts that (x, y)∈ 𝓟 in Γ1 and the condition R(y) = LR(x). We next show how to determine P- positions of Γ1 via 𝒰.

#### Lemma 3.4

Let {Vm}m≥0 denote the set of all vile numbers in 𝒰 with 0 = V0 < V1 < V2< …, and put R(Dm) = LR(Vm) for all m. Then $Dm−(s−1)Vm=(2⌈t/2⌉+4)mforallm.$(5)

#### Proof

Induction on m. Clearly for m = 0. Suppose Dm−(s−1)Vm = (2⌈ t/2⌉ + 4)m for arbitrary but fixed m. It suffices to prove that the assertion holds for m + 1. Let Vm = $\sum _{i=0}^{n}\phantom{\rule{thinmathspace}{0ex}}{d}_{i}{u}_{i}.$ Since R(Dm) = LR(Vm), Dm = $\sum _{i=0}^{n}\phantom{\rule{thinmathspace}{0ex}}{d}_{j}{u}_{i\phantom{\rule{thinmathspace}{0ex}}+\phantom{\rule{thinmathspace}{0ex}}1}.$ So we have $Dm−(s−1)Vm=(2⌈t/2⌉+4)m=∑i=0ndin(ui+1−(s−1)ui).$(6)

Let q = s−2 and r = s + ⌈ t/2 ⌉. Then the linear recurrence of 𝒰 has the form un = run−1 + (q + 1)un−2 (n≥1), with the digits di∈{0, 1, …, r} such that di + 1 = rdiq(i≥0). We proceed by distinguish three cases, because the tail of R(Vm) must be one of the following three forms:

1. The tail of R(Vm) has digits $d2kd2k−1d2k−2…d2d1d0=d2krq…rqrq,$ for some k ∈ ℤ0, where d2k ∈ {0, 1,…, q} and d2k = qd2k+1 < r. Then it is not hard to see that Vm + 2 = (d2k+1)u2k + $\sum _{i=2k+1}^{n}\phantom{\rule{thinmathspace}{0ex}}{d}_{i}{u}_{i},$ and so Vm + 2 is vile. Thus Vm+1 = Vm + 2, since Vi is even for every i∈ ℤ0.

Thus $Dm+1−(s−1)Vm+1=(d2k+1)(u2k+1−(s−1)u2k)+∑i=2k+1ndi(ui+1−(s−1)ui)=u2k+1−(s−1)u2k+∑i=2kndi(ui+1−(s−1)ui).$(7)

On the other hand, by Eq. (6) and the recurrence run−1 + (q + 1)un−2 = un, we have $(2⌈t/2⌉+4)m=q(u1−(s−1)u0)+r(u2−(s−1)u1)+q(u3−(s−1)u2)+⋯+q(u2k−1−(s−1)u2k−2)+r(u2k−(s−1)u2k−1)+∑i=2kndi(ui+1−(s−1)ui)=u2k+1−u1−(s−1)u2k+(s−1)u0+∑i=2kndi(ui+1−(s−1)ui)=u2k+1−(s−1)u2k−(2⌈t/2⌉+4)+∑i=2kndi(ui+1−(s−1)ui).$

Therefore, it follows from Eq. (7) that $(2⌈t/2⌉+4)(m+1)=u2k+1−(s−1)u2k+∑i=2kndi(ui+1−(s−1)ui)=Dm+1−(s−1)Vm+1.$

2. The tail of R(Vm) has digits $d2k+1d2kd2k−1…d2d1d0=d2k+1rq…rqrqr,$ for some k ∈ ℤ0, where d2k+1 ∈ {0, 1,…, q} and d2k + 1 = qd2k+2 < r. Then Vm + 2 = (d2k+1 + 1)u2k+1 + $\sum _{i=2k+2}^{n}\phantom{\rule{thinmathspace}{0ex}}{d}_{i}{u}_{i},$ and so Vm + 2 is dopey. But Vm + 4 is vile, since R(Vm + 4) ends in 1. Thus Vm + 1 = Vm + 4 = u0 + (d2k + 1 + 1)u2k+1 + $\sum _{i=2k+2}^{n}\phantom{\rule{thinmathspace}{0ex}}{d}_{i}{u}_{i}.$

Hence, $Dm+1−(s−1)Vm+1=(u1−(s−1)u0)+(d2k+1+1)(u2k+2−(s−1)u2k+1)+∑i=2k+2ndi(ui+1−(s−1)ui)=(2⌈t/2⌉+4)+u2k+2−(s−1)u2k+1+∑i=2k+1ndi(ui+1−(s−1)ui).$(8)

On the other hand, by Eq. (6), $(2⌈t/2⌉+4)m=r(u1−(s−1)u0)+q(u2−(s−1)u1)+⋯+q(u2k−(s−1)u2k−1)+r(u2k+1−(s−1)u2k)+∑i=2k+1ndi(ui+1−(s−1)ui)=u2k+2−(s−1)u2k+1+∑i=2k+1ndi(ui+1−(s−1)ui).$

The last equality follows from that summing the positive terms, adding and subtracting (s−1)u0, leads to u2k+2− 2(s−1), and that summing the negative terms, subtracting and adding (s−1)2u−1 = 2(s−1), leads to −(s − 1)u2k+1 + 2(s−1). Thus, by Eq. (8), D1m+1−(s−1)Vm+1 = (2⌈ t/2⌉ + 4)(m + 1), as required.

3. The digit d0 satisfies q < d0 < r. By the definition of 𝒰, d1 < r, and so Vm+1 = Vm + 2. Thus it follows from Eq. (6) that $Dm+1−(s−1)Vm+1=(d0+1)(u1−(s−1)u0)+∑i=1ndi(ui+1−(s−1)ui)=(2⌈t/2⌉+4)+∑i=0ndi(ui+1−(s−1)ui)=(2⌈t/2⌉+4)(m+1).$

Finally, note that if Vm ends in an even number of 0s, it is of the form (i). The proof is completed. □

#### Theorem 3.5

For all n ∈ ℤ0, (Vn, Dn) = (An, Bn).

#### Proof

Obviously, (Dn, D0) = (A0, B0) = (0, 0). For n ≥ 1, we have two facts:

1. An, Bn, Vn, Dn∈ ℤeven;

2. For all t∈ ℤ+, t + δt = 2⌈ t/2⌉.

By Eqs. (4) and (5), together with Fact (ii), Bn and Dn have the same formation law. It remains only to show that An and Vn have the same inductive formation rule, i.e., Vn = mex{Vi, Vi + 1, Di, Di + 1 : 0 ≤ i < n}.

Now for every n ≥ 1, Dn is dopey, since Vn is vile and R(Dn) = LR(Vn). By Fact (i), Dn>Vn + 1 > Vn. It follows that $\bigcup _{i=1}^{\mathrm{\infty }}{V}_{i}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\bigcup _{i=1}^{\mathrm{\infty }}{D}_{i}$ are complementary with respect to ℤeven(>0), since every positive integer has precisely one representation in 𝒰1, either vile as Vns do or dopey as the Dns do. Let S = {Vi, Vi + 1, Di, Di + 1 : 0 ≤ i < n}. Suppose mex S = Dj for some jn. This implies that Vj ∈ S on account of Vj < Dj, and then j < n, a contradiction. Therefore, mex S = Vn, the assertion follows. □

#### Corollary 3.6

Given a position (x, y)∈ Γ1 with s > 1. (x, y) is a P-position if and only if there exists some n ∈ ℤ0 such that (⌊ x/2⌋, ⌊ y/2⌋) = (Vn, Dn).

#### Proof

If (x, y) is a P-position of Γ1 with its P-generator (⌊ x/2 ⌋, ⌊ y/2 ⌋) = (An, Bn) for some n ∈ ℤ 0, then by Theorem 3.5, (An, Bn) = (Vn, Dn), and vice versa. □

Given any game position (x, y) with 0 < xy, compute R(x) using the greedy algorithm mentioned above. If R(x) ends in an odd number of 0s, then x = Bn for some n ∈ ℤ+. Then we move yAn, where R(Bn) = LR(An). If R(x) ends in an even number of 0s, then x = An for some n ∈ ℤ+. The relative size of y and Bn can also be tested, since R(Bn) = LR(An). Thus the complexity of this computation, up to a multiplication constant, is that of computing R(x), which is linear in log x. Hence, this winning strategy bases on 𝒰 is polynomial in the input size log x.

## 4 Analyzing the equivalences

#### Lemma 4.1

Let An and Bn be determined by Eq. (4). Then for every n > m ≥ 0, let AnAm = 2(nm) + 2r. If r ≥ 1, then AnAm≥(r−1)(2s + t + δt + 2) + 4.

#### Proof

Let S = {x : Am < xAn, x ∈ ℤeven}. As in the proof of Lemma 2.3, ♯(S) = (AnAm)/2, ♯A = ♯(AS) = nm, and ♯ B = ♯(BS) = ♯(S)− ♯ A = r.

By Bj+1, Bj+2, …, Bj+r we denote the r elements of BS. From the properties of An and Bn in the proof of Theorem 3.1, we have Am + 2 ≤ Bj+1 < Bj+2 < ⋯ < Bj+rAn−2. Since also Bj+1Bj ∈ {2s + t + δt + 2, 4s + t + δt}, thus ${A}_{n}-{A}_{m}\ge {B}_{j+r}-{B}_{j+1}+4=4+\sum _{i=j+1}^{j+r-1}\left({B}_{i+1}-{B}_{i}\right)\ge \left(r-1\right)\left(2s+t+{\delta }_{t}+2\right)+4.$ □

#### Lemma 4.2

Given two parameters s, t ∈ ℤ+. For every n > m > 0, there is no i ∈ ℤ+ such that ${A}_{i}^{\prime }={A}_{n}-{B}_{m}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}and\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{i}^{\prime }={B}_{n}-{A}_{m},$ where ${A}_{i}^{\prime }\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}and\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{i}^{\prime }$ are determined in Eq. (2), Ai and Bi are determined in Eq. (4).

#### Proof

Suppose that there exits some i0 ∈ ℤ+ such that ${A}_{{i}_{0}}^{\prime }={A}_{n}-{B}_{m}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{{i}_{0}}^{\prime }={B}_{n}-{A}_{m}.$ Write AnAm = 2(nm) + 2r. According to the proof of Theorem 3.1, we have 2(nm) ≤ AnAm ≤ 4(nm) for every n > m ≥0, thus r ≥ 0.

If r = 0. From Lemma 2.2, for all $n\in {\mathbb{Z}}^{0},\phantom{\rule{thinmathspace}{0ex}}2n\le {A}_{n}^{\prime }\le \phantom{\rule{thinmathspace}{0ex}}4n.$ Thus 2(nm) = AnAm > AnBm = ${A}_{{i}_{0}}^{\prime }$ ≥ 2i0, i.e., nm > i0. Hence, $Bi0′=Bn−Am>Bn−Bm>(s−1)Ai0′+(t+δt+4)i0=Bi0′+4i0−Ai0′≥Bi0′,$ a contradiction.

If r ≥ 1, then 2(nm) + 2r = AnAm>AnBm = ${A}_{{i}_{0}}^{\prime }.$ More accurately, 2(nm) ≥ ${A}_{{i}_{0}}^{\prime }$ −2r + 2. By Lemma 4.1, we have AnAm≥(r−1)(2s + t + δt + 2) + 4 > (r−1)(t+δt + 4). Then $Bi0′+Ai0′=Bn−Bm+An−Am=s(An−Am)+(t+δt+4)(n−m)≥s(Ai0′+Bm−Am)+(t+δt+4)(Ai0′/2−r+1)=(s+1)Ai0′+Ai0′+s(Bm−Am)+(t+δt)Ai0′/2−(r−1)(t+δt+4)≥(s+1)Ai0′+(t+δt)i0+An−Am−(r−1)(t+δt+4)>(s+1)Ai0′+(t+δt)i0=Bi0′+AiO′,$ another contradiction. □

#### Lemma 4.3

For s > 1 and t ≥ 1. Suppose that (An, Bn)→(Am, Bm) with ${A}_{j}^{\prime }={A}_{n}-{A}_{m}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}and\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{j}^{\prime }={B}_{n}-{B}_{m}$ for some n > m ≥ 0. Then $Aj′≤2(j+1+2s−2t+δt)$(9)

#### Proof

Let S = {x : Am < xAn, and x ∈ ℤeven}. As the above, ♯ (S) = ${A}_{j}^{\prime }$ /2, ♯A = ♯(AS) = nm, ♯B = ♯(BS) = ♯(S)− ♯A. Then 2(nm) = ${A}_{j}^{\prime }$ −2 ♯B. The minimum value of 2(nm) is reached at the maximum value of ♯B, that is, when there is a smallest distance of 2s + t + δt+2 between consecutive elements of BS.

Since ${A}_{j}^{\prime }$ is even, and also 2s+ t+δt+2 is even, dividing ${A}_{j}^{\prime }$ by 2s+t+δt+2 gives ${A}_{j}^{\prime }$ = (2s+t+δt+2)q + 2r, r ∈ {1, 2, 3,…, s+(t + δt)/2}. Note that for r ≥ 2, there may be an additional element in BS. Thus $2(n−m)≥(2s+t+δt)q+2rifr∈{0,1},2(r−1)ifr∈{3,4,…,s+(t+δt)/2}.$

Now $Bj′=Bn−Bm=∑i=mn−1(Bi+1−Bi)≥(2s+t+δt+2)(n−m).$

If r ∈ {0, 1}, $Bj′≥(2s+t+δt+2)(n−m)≥(s+(t+δt)/2+1)((2s+t+δt)q+2r)=(s+(t+δt)/2)Aj′+2r≥(s+(t+δt)/2)Aj′.$

If r ∈ {2, 3,⋯, s +(t+δt)/2}, $Bj′≥(2s+t+δt+2)(n−m)≥(s+(t+δt)/2)(2s+t+δt)q+(2s+t+δt+2)(r−1)=(s+(t+δt)/2)Aj′+2r−(2s+t+δt+2)≥(s+(t+δt)/2)Aj′+2−(2s+t+δt).$

In either case, the following inequality holds: $sAj′+(t+δt)j=Bj′≥(s+(t+δt)/2)Aj′+2−(2s+t+δt)$ Therefore, $Aj′≤2(j+1+2s−2t+δt).$ □

#### Lemma 4.4

Given s, t ∈ ℤ+. For 2s + t +δt > 4 and t +δt ≥ 2s−2, suppose that there is a move (An, Bn)→ (Am, Bm) with ${A}_{j}^{\prime }$ = AnAm and ${B}_{j}^{\prime }$ = BnBm for some n > m ≥ 0. Then

1. If s = 1 and t ∈ {3, 4}, this is impossible for any j ≥ 1. If s = 1 and t > 4, the only possibility is j = 3 + (t + δt)/2.

2. If s = 2 and t ≥ 1, this is impossible for any j ≥ 1.

3. If s ≥ 3 and t + δt ≥ 2s−2, the only possibility is j = 2 +(t+δt)/2.

#### Proof

Again let S = {x : Am < xAn, x ∈ ℤeven}. From the proof of Lemma 4.3 we have 2(nm) = ${A}_{j}^{\prime }$ −2♯B. By Lemma 2.2, ${A}_{j}^{\prime }$ ≥ 2j for all j ∈ ℤ+. Thus Eq. (9) implies that there are three possibilities: (a) ${A}_{j}^{\prime }$ = 2j, (b) ${A}_{j}^{\prime }$ = 2j+2 and (c) ${A}_{j}^{\prime }$ = 2j+4.

Case (a) ${A}_{j}^{\prime }$ = 2j. By definition, ${B}_{j}^{\prime }$ = (2s + t +δt)j. By Lemma 2.3, ${A}_{j}^{\prime }$ = 2j means that 2 ≤ AnAm = 2j ≤ 2s + t +δt−2.

There must be up to one BiS, i.e., ♯B∈{0, 1}. For if there are more than two elements in BS, then there is a gap less than 2s + t +δt−2 between the adjacent elements of BS, but it contradicts with the fact that Bi+1Bi ∈ {2s + t +δt+2, 4s+ t +δt}.

So suppose ♯B = 0. Then nm = ${A}_{j}^{\prime }$ /2 = j, this implies that AiAi−1 = 2 for all m < in. Accordingly, BiBi−1 = 2s + t +δt+2 for m < in. Thus BnBm = (2s + t +δt+2)(nm)>(2s + t +δt) j = ${B}_{j}^{\prime }$ , This contradicts our assumption.

Now suppose ♯B = 1. Then nm = ( ${A}_{j}^{\prime }$ −2)/2 = j−1. Let Bi0 denote the only element of BS with Aλ < Bi0 < Aλ+1, where m<λ<n. $…,Am,…,Aλ⏞2(λ−m),Bi0⏟4,Aλ+1,…,An,⏞2(n−λ−1)…$

Therefore, $Bn−Bm=∑m≤i<λ(Bi+1−Bi)+(Bλ+1−Bλ)+∑λ

If s ∈ {1, 2}, then 2j−(t + δt+4) ≤ 2s + t +δt−2−(t + δt+4) = 2s−6 < 0. Thus for any t ∈ ℤ+, ${B}_{j}^{\prime }$ = BnBm is impossible.

If s ≥ 3, then ${B}_{j}^{\prime }$ = BnBm if and only if 2 ≤ 2j = t + δt+4 ≤ 2s + t +δt−2, which is true for any t ∈ ℤ+. Thus the only possibility is j = (t + δt)/2+2.

Case (b) ${A}_{j}^{\prime }$ = 2j+2. In this case, ${B}_{j}^{\prime }$ = s ${A}_{j}^{\prime }$ +(t + δt)j = (2s + t +δt)j+2s. By Lemma 2.3, ${A}_{j}^{\prime }$ = 2j + 2 means that $2s+t+δt≤An−Am−2=2j≤4s+2t+2δt−4.$(10)

We claim that ♯B∈{1, 2}. Indeed, if ♯B = 0, then nm = ${A}_{j}^{\prime }$ /2 = j+1. By the same argument as for the case (a), we get ${B}_{j}^{\prime }$ = BnBm = (2s + t +δt+2)(nm) = (2s + t +δt+2)(j+1)> ${B}_{j}^{\prime }$ , a contradiction. If ♯B ≥ 3, then there is a gap less than (AnAm)max/2 between the neighbouring elements of BS. But (AnAm)/2 ≤ 2s + t +δt−1, so this also cannot happen by reason of Bi+1Bi ∈{2s + t +δt+2, 4s+ t +δt}. We first suppose ♯B = 1. Then nm = ( ${A}_{j}^{\prime }$ - 2)/2 = j. In the same manner of case (a), we can see that $Bn−Bm=(2s+t+δt+2)(n−m−1)+4s+t+δt=(2s+t+δt+2)(j−1)+4s+t+δt=(2s+t+δt+2)j+2s+2j−2=Bj′+2j−2≥Bj′+(2s+t+δt−2)>Bj′,$ a contradiction.

Next suppose ♯B = 2. Then nm = ( ${A}_{j}^{\prime }$ −4)/2 = j−1. Let Bj0, Bi0+1BS with Aλ0 < Bj0 < Aλ0+1, and Aλ1 < Bi0+1 < Aλ1+1, where m < λ0 < λ1 < n. $…,Am,⋯,Aλ0⏞2(λ0−m),Bi0⏟4,Aλ0+1,…,Aλ1⏞2(λ1−λ0−1),Bi0+1⏟4,Aλ1+1,…,An⏞2(n−λ1−1),…$

Similarly, we have $Bn−Bm=(2s+t+δt+2)(n−m−2)+2(4s+t+δt)=(2s+t+δt+2)(j−3)+2(4s+t+δt)=(2s+t+δt)j+2s+2j−(t+δt+6)=Bj′+2j−(t+δt+6).$(11)

It is worth to mention that Bj0Am + 2 and Bi0 + 1 ≤ An − 2. Consequently, 2j + 2 = $\begin{array}{}{A}_{j}^{\prime }\end{array}$ = AnAmBi0 + 1 − Bi0+4 ≥ 2s+ t + δt + 6. It follows Eq. (10) that $2s+t+δt+4≤2j≤4s+2t+2δt−4.$(12)

If s = 1, t ∈{3, 4}, there is no such j satisfying Eq. (12).

If s = 1, t > 4, by Eq. (11), BnBm = $\begin{array}{}{B}_{j}^{\prime }\end{array}$ if and only if j = (t + δt)/2+3, which satisfies Eq. (12).

If s ≥ 2, then 2j ≥ 2s + t + δt + 4 ≥ t + δt + 8 > t + δt + 6, thus $\begin{array}{}{B}_{j}^{\prime }\end{array}$ = BnBm is impossible.

Case (c) $\begin{array}{}{A}_{j}^{\prime }\end{array}$ = 2j + 4. On account of Eq. (9) this case can happen only when t + δt = 2s − 2. Thus we have $\begin{array}{}{B}_{j}^{\prime }\end{array}$ = sA $\begin{array}{}{A}_{j}^{\prime }\end{array}$ +(t + δt)j = (4s − 2)j + 4s. And the condition 2s + t + δt = 4s− 2 > 4 implies s ≥ 2. We below consider s = 2 and s ≥ 3, respectively.

(c-i) s = 2 (and also t + δt = 2). Now $\begin{array}{}{B}_{j}^{\prime }\end{array}$ = 6j + 8. By Lemma 2.3, $\begin{array}{}{A}_{j}^{\prime }\end{array}$ = 2j + 4 implies that $\begin{array}{}{B}_{2}^{\prime }-2\le {A}_{n}-{A}_{m}-4=2j\le {B}_{3}^{\prime }-6.\end{array}$ Recall that $\begin{array}{}{A}_{0}^{\prime }={B}_{0}^{\prime }=0,{A}_{1}^{\prime }=\text{mex}\left\{0,1\right\}=2,\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{1}^{\prime }=2s+t+{\delta }_{t}=6.\end{array}$ Thereby, $\begin{array}{}{A}_{2}^{\prime }=\text{mex}\left\{0,1,2,3,6,7\right\}=4\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and then}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{2}^{\prime }=4s+2\left(t+{\delta }_{t}\right)=12.\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{Also}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{A}_{3}^{\prime }=\text{mex}\left\{0,1,2,3,4,5,6,7,12,13\right\}=8,\end{array}$ and so $\begin{array}{}{B}_{3}^{\prime }=22.\end{array}$ Thus 14 ≤ AnAm ≤ 24, and 5 ≤ j ≤ 8. In this case, we also have the fact that Bi+1Bi ∈ {2s + t + δt+2, 4s + t + δt}={8, 10}.

Then we claim that ♯B ∈ {1, 2, 3}. Indeed, if ♯B = 0, then nm = $\begin{array}{}{A}_{j}^{\prime }\end{array}$ /2 = j + 2. By the same argument as for the cases (a) and (b), we have $\begin{array}{}{B}_{j}^{\prime }\end{array}$ = BnBm = 8(nm) = 8(j + 2)> $\begin{array}{}{B}_{j}^{\prime }\end{array}$ , a contradiction. If ♯B ≥ 4, then there is a gap less than (AnAm)/3 ≤ 8 between adjacent elements of BS, which is impossible.

Now if ♯B = 1, then nm = ( $\begin{array}{}{A}_{j}^{\prime }\end{array}$ − 2)/2=j + 1. As in the proof of case (a), BnBm = 8(nm − 1)+10 = 8j + 10 > $\begin{array}{}{B}_{j}^{\prime }\end{array}$ , contradicting the assumption.

If ♯B = 2, we know nm = ( $\begin{array}{}{A}_{j}^{\prime }\end{array}$ − 4)/2 = j. Similarly, BnBm = 8(nm − 2) + 20 = 8(j − 2)+20 > $\begin{array}{}{B}_{j}^{\prime }\end{array}$ ,a contradiction.

If ♯B = 3, then nm = ( $\begin{array}{}{A}_{j}^{\prime }\end{array}$ − 6)/2 = j − 1. Assume the three elements in BS are Bj0, Bi0 + 1, Bi0 + 2 for some i0 ∈ ℤ+, then we have Bi0Am + 2 and Bi0 + 2An− 2, thus $\begin{array}{}{A}_{j}^{\prime }\end{array}$ = AnAmBi0 + 2Bj0 + 4 ≥ 20, i.e., j ≥ 8. In the same manner we can see that $Bn−Bm=8(n−m−3)+30=8(j−4)+30>6j+8=Bj′$ since j ≥ 8 (by above 5 ≤ j ≤ 8, the only possibility j fact is j =8), giving a contradiction.

(c-ii) s ≥ 3. Then we have 2s + t +δt = 4s − 2 ≥ 10. Recall that $\begin{array}{}{A}_{0}^{\prime }={B}_{0}^{\prime }=0,\phantom{\rule{thinmathspace}{0ex}}{A}_{1}^{\prime }=2,\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{and}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{1}^{\prime }=2s+t+{\delta }_{t}\ge 10.\end{array}$ So $\begin{array}{}{A}_{2}^{\prime }=\text{mex}\left\{0,1,2,3,{B}_{1}^{\prime },\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}{B}_{1}^{\prime }+1\right\}=4,{B}_{2}^{\prime }=4s+2\left(t+{\delta }_{t}\right)=8s-4.\end{array}$ Also $\begin{array}{}{A}_{3}^{\prime }=\text{mex}\left\{0,1,2,3,4,5,{B}_{1}^{\prime },{B}_{1}^{\prime }+1,{B}_{2}^{\prime },{B}_{2}^{\prime }+1\right\}=6,\end{array}$ and so $\begin{array}{}{B}_{3}^{\prime }=12s-6.\end{array}$ Lemma 9 now shows that 8s− 2 =$\begin{array}{}{B}_{2}^{\prime }+2\le {A}_{n}-{A}_{m}={A}_{j}^{\prime }\le {B}_{3}^{\prime }-2=12s-8,\end{array}$ i.e., 4s − 3 ≤ j ≤ 6s−6.

Now we claim that ♯B ∈ {1, 2, 3}. Otherwise, if ♯B = 0, then nm = $\begin{array}{}{A}_{j}^{\prime }\end{array}$ /2 = j + 2, we have $\begin{array}{}{B}_{j}^{\prime }\end{array}$ = (2s+ t + δt + 2)(nm) = (4s − 2)(j + 2) > (4s − 2)j + 4s = $\begin{array}{}{B}_{j}^{\prime }\end{array}$ , a contradiction. If ♯B ≥ 4, there is a gap less than (AnAm)/3 < 4s between neighbouring elements of BS, but Bi+1Bi ∈ {2s + t + δt+2, 4s + t +δt}= {4s, 6s − 2}, giving a contradiction.

First suppose ♯B = 1. As the above, we get BnBm = 4s(nm − 1) + (6s − 2) = 4sj + 6s − 2= $\begin{array}{}{B}_{j}^{\prime }\end{array}$ + 2j + 2s − 2 > $\begin{array}{}{B}_{j}^{\prime }\end{array}$ by reason of j ≥ 4s − 3 and s ≥ 3, a contradiction.

Next suppose ♯B = 2. Similarly, BnBm = 4s(nm − 2) + 2(6s − 2) = 4s(j − 2) + 12s − 4 = $\begin{array}{}{B}_{j}^{\prime }\end{array}$ + 2j − 4 > $\begin{array}{}{B}_{j}^{\prime }\end{array}$ , a contradiction.

Finally suppose ♯B = 3. Analogously, we have BnBm = 4s(nm − 3) + 3(6s − 2) = 4s(j − 4) + 18s − 6 = $\begin{array}{}{B}_{j}^{\prime }\end{array}$ + 2j − 2s − 6 > $\begin{array}{}{B}_{j}^{\prime }\end{array}$ since j ≥ 4s − 3 and s ≥ 3.

Therefore, if $\begin{array}{}{A}_{j}^{\prime }\end{array}$ = 2j + 4, for any s ≥ 2 and t ≥ 1 with t + δt = 2s − 2, the hypothesis $\begin{array}{}{B}_{j}^{\prime }\end{array}$ = BnBm is impossible. □

Given two games, they have the same game positions but with possibly different move rules. We call them equivalent if their P-positions are the same. Two equivalent games certainly have also the same N-positions, as well as winning strategy.

#### Theorem 4.5

For (s = 1 and t ∈{3, 4}) or (s=2 and t ≥ 1), Γ1 and Γ2 are equivalent.

#### Proof

Recall that Γ2 can be viewed as Γ1 to which the moves $\begin{array}{}\bigcup _{i\ge 2}\left({A}_{i}^{\prime },{B}_{i}^{\prime }\right)\end{array}$ have been adjoined. By Lemmas 4.2 and 4.4, for (s =1 and t ∈{3, 4}) or (s = 2 and t ≥ 1), there is no i ≥ 2 such that $\begin{array}{}\left({A}_{i}^{\prime },{B}_{i}^{\prime }\right)=\left({A}_{n}-{A}_{m},{B}_{n}-{B}_{m}\right)\end{array}$ or (AnBm, BnAm) for any n > m ≥ 0. In other words, adding $\begin{array}{}\bigcup _{i\ge 2}\left({A}_{i}^{\prime },{B}_{i}^{\prime }\right)\end{array}$ to Γ1 makes the set of its P- positions 𝓟 unaltered. Thus Γ1 and Γ2 have the same set of P-positions. □

#### Theorem 4.6

For s = 1 and t ≥ 4, Γ1 and Γ3 are equivalent.

#### Proof

Γ3 can be viewed as Γ1 to which infinitely many of its nonzero P-positions are adjoined, but except one, $\begin{array}{}\left({A}_{3+\left(t+{\delta }_{t}\right)/2}^{\prime },{B}_{3+\left(t+{\delta }_{t}\right)/2}^{\prime }\right).\end{array}$ By Lemmas 4.2 and 4.4, for s = 1 and t ≥ 4, there is only one j = 3+(t + δt)/2 such that $\begin{array}{}\left({A}_{i}^{\prime },{B}_{i}^{\prime }\right)=\left({A}_{n}-{A}_{m},{B}_{n}-{B}_{m}\right)\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{or}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\left({A}_{n}-{B}_{m},{B}_{n}-{A}_{m}\right)\end{array}$ for some n > m ≥ 0. Thus those additional moves to Γ1 do not change the set of its P-positions 𝓟, that is, Γ1 and Γ3 have the same set of P-positions. □

#### Theorem 4.7

For s ≥ 3 and t + δt ≥ 2s − 2, Γ1 and Γ4 are equivalent.

#### Proof

Similarly to Γ3, Γ4 is obtained from Γ1 by adjoining to it infinitely many of its nonzero P-positions, but except $\begin{array}{}\left({A}_{2+\left(t+{\delta }_{t}\right)/2}^{\prime },{B}_{2+\left(t+{\delta }_{t}\right)/2}^{\prime }\right).\end{array}$ Again by Lemmas 4.2 and 4.4, for s ≥ 3 and t + δt ≥ 2s − 2, there is only one j = 2+(t + δt)/2 such that $\begin{array}{}\left({A}_{i}^{\prime },{B}_{i}^{\prime }\right)=\left({A}_{n}-{A}_{m},{B}_{n}-{B}_{m}\right)\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\text{or}\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thinmathspace}{0ex}}\left({A}_{n}-{B}_{m},{B}_{n}-{A}_{m}\right)\end{array}$ for some n > m ≥ 0. Thus the additional moves to Γ1 do not change the set of its P-positions 𝓟. Therefore, Γ1 and Γ4 are equivalent. □

## 5 Conclusions

Both exponential and polynomial time winning strategies for Γ1 are obtained when 2s+ t + δt > 4, and under certain conditions, Γ2, Γ3, Γ4 have the same winning strategy with Γ1. However, the special case s = 1 and t ∈{1, 2} is not covered, in which the P-positions are actually too irregular to be described explicitly. Similarly, the special case s = t = 1 is not involved in [12], nor the special case a = 1 is covered in [5].

We mentioned a modular type game in [10], where a player may have to remove a multiple of K (K is a fixed positive integer) tokens in each move, and the move rules are the same as in (s, t)-Wythoff’s game. Thus the case K = 1 is exactly (s, t)-Wythoff’s game, and the case K = 2 is our Restricted (s, t)-Wythoff. Another question of interest is to consider what the results might be if we exploit the idea “adding P-positions as moves” to examine this modular type game, which is worth further studying and it is in our agenda.

## Acknowledgement

This work is supported by the National Natural Science Foundation of China under Grants 61373174.

## References

• [1]

Duchêne, E., Fraenkel, A.S., Nowakowski, R.J., Rigo, M., Extensions and restrictions of Wythoff’s game preserving its P-positions, J. Combin. Theory Ser. A, 2010, 117, 545-567.

• [2]

Fraenkel, A.S., New games related to old and new sequences, Integers, Electr. J. Combin. Number Theory, 2004, 4, #G6. Google Scholar

• [3]

Berlekamp, E.R., Conway, J.H., Guy, R.K., Winning Ways for Your Mathematical Plays, Volume 1-4, A K Peters, Wellesley, MA, 2001-2004. 2nd edition: vol.1 (2001), vols. 2,3 (2003), vol. 4 (2004). Google Scholar

• [4]

Duchêne, E., Gravier, S., Geometrical extensions of Wythoff’s game, Discrete Math., 2009, 309, 3595-3608.

• [5]

Fraenkel, A.S., How to beat your Wythoff games’ opponent on three fronts, Amer. Math. Monthly, 1982, 89, 353-361.

• [6]

Fraenkel, A.S., Heap games, Numeration systems and Sequences, Annals Combin., 1998, 2, 197-210.

• [7]

Fraenkel, A.S., Borosh, I., A generalization of Wythoff’s game, J. Combin. Theory, Ser. A, 1973,15,175-191. Google Scholar

• [8]

Fraenkel, A.S., Zusman, D., A new heap game, Theoret. Comput. Sci., 2001, 252, 5-12.

• [9]

Liu, W.A., Li, H., General Restriction of (s, t)-Wythoff’s Game, Electron. J. Combin., 2014, 21(2), #P2.44. Google Scholar

• [10]

Li, H., Liu, S., Fraenkel, A.S., Liu, W.A., Variants of (s, t)-Wythoff’s game, accepted for publiction. Google Scholar

• [11]

Fraenkel, A.S., Ozery, M., Adjoining to Wythoff’s game its P-positions as moves, Theoret. Comput. Sci., 1998, 205, 283-296.

• [12]

Liu, W.A., Zhao, X., Adjoining to (s, t)-Wythoff’s game its P-positions as moves, Discrete Appl. Math., 2014, 179, 28-43.

• [13]

Li, H., Liu, S., Extensions and restrictions of a-Wythoff’s game, submitted for publiction. Google Scholar

• [14]

Fraenkel, A.S., Systems of numeration, Amer. Math. Monthly 92 (1985), 105-114.

• [15]

Fraenkel, A.S., The vile, dopey, evil and odious game players, Discrete Math., 312 (2012), 42-46, special volume in honor of the 80th birthday of Gert Sabidussi.

Accepted: 2017-01-26

Published Online: 2017-03-20

Citation Information: Open Mathematics, Volume 15, Issue 1, Pages 281–295, ISSN (Online) 2391-5455,

Export Citation