Ry u o Nim: A Variant of the classical game of Wythoffs Nim - - PowerPoint PPT Presentation

ry u o nim a variant of the classical game of wythoff s
SMART_READER_LITE
LIVE PREVIEW

Ry u o Nim: A Variant of the classical game of Wythoffs Nim - - PowerPoint PPT Presentation

Ry u o Nim: A Variant of the classical game


slide-1
SLIDE 1 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Ry¯ u¯

  • Nim: A Variant of the classical game of

Wythoff’s Nim

Tomoaki Abuku, Masanori Fukui, Ryohei Miyadera, Yushi Nakaya, Kouki Suetsugu, Yuki Tokuni

Graduate School of Pure and Applied Sciences, University of Tsukuba, Japan

Games and Graphs Workshop (Lyon, 23–25 October, 2017)

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 1 / 25

slide-2
SLIDE 2 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Contents

1

Introduction Wythoff’s Nim Ry¯ u¯

  • Nim

The Grundy value of Ry¯ u¯

  • Nim

2

Generalized Ry¯ u¯

  • Nim

Restrict the diagonal movement version Restrict the diagonal and side movement version

3

3-dimensional Ry¯ u¯

  • Nim

The rules of 3-dimensional Ry¯ u¯

  • Nim

The P-positions of 3-dimensional Ry¯ u¯

  • Nim

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 2 / 25

slide-3
SLIDE 3 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Wythoff’s Nim

Wythoff’s Nim is a well-known impartial game with two heaps of

  • tokens. The rules are as follows:

The legal move is to remove any number of tokens from a single heap (as in Nim) or

remove the same number of tokens from both heaps. The end position is the state of no tokens in both heaps. Wythoff’s Nim is also called ”Corner the Queen.”

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 3 / 25

slide-4
SLIDE 4 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Corner the Queen

The rules of the corner the queen are as follows: Each player, when it is his turn to move, can move a Chess queen an arbitrary distance North, West or North-West as indicated by arrows. Clearly, this game is equivalent to Wythoff’s Nim.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 4 / 25

slide-5
SLIDE 5 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Wythoff’s Nim

The Grundy value of Wythoff’s Nim position is not known, but the following theorem is well-known about P-positions of Wythoff’s Nim.

Theorem

Let (m, n) (m ≤ n) be a Wythoff’s Nim position. For n − m = k, the P-positions of Wythoff’s Nim are given by (⌊kΦ⌋, ⌊kΦ⌋ + k), (⌊kΦ⌋ + k, ⌊kΦ⌋), where Φ is the golden ratio, i.e. Φ = 1+

√ 5 2

.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 5 / 25

slide-6
SLIDE 6 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Ry¯ u¯

  • Nim

Movement of pieces in Chess

▶ King; can move one by one, vertically, horizontally and

diagonally.

▶ Rook; can move as many steps as you like, vertically and

horizontally. There are other pieces of chess, but this time I will only consider these two.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 6 / 25

slide-7
SLIDE 7 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Ry¯ u¯

  • Nim

Movement of pieces in Sh¯

  • gi (Japanese chess)

Sh¯

  • gi is a Japanese board game similar to Chess.

In Sh¯

  • gi, the movement of the pieces are almost the same with that
  • f Chess.

▶ Hisya (”flying chariot”); the movement is exactly the same with

that of Rook.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 7 / 25

slide-8
SLIDE 8 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Ry¯ u¯

  • Nim

In Chess, when a piece called pawn reaches the first row, it is replaced by a piece of the player’s choice (promotion). In Sh¯

  • gi, some of the pieces turn over and become more powerful

when they reach the third row. For example, in the case of a Hisya, it turns over and becomes a Ry¯ u¯

  • , which is more powerful than a Hisya.

▶ Ry¯

  • (”dragon king”, promoted Hisya); can move both the

Hisya and the king.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 8 / 25

slide-9
SLIDE 9 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Ry¯ u¯

  • Nim

Ry¯ u¯

  • Nim is equivalent to the game played with a Ry¯

  • instead of a

queen in ”Corner the Queen.” The legal move is to remove any number of tokens from a single heap (as in Nim) or remove one token from both heaps.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 9 / 25

slide-10
SLIDE 10 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Grundy value of Ry¯ u¯

  • Nim

Grundy values of Ry¯ u¯

  • Nim are examined and they are shown in the

following table.

▶ The table of the Grundy value of Ry¯

  • Nim

When you observe them thoroughly, you can see regularity.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 10 / 25

slide-11
SLIDE 11 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Grundy value of Ry¯ u¯

  • Nim

That means it is divided into 3 × 3 blocks.

▶ Table of ((x + y) mod 3)

((x + y) mod 3) is the remainder obtained when x + y is divided by 3.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 11 / 25

slide-12
SLIDE 12 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Grundy value of Ry¯ u¯

  • Nim

When you add this term to the table, we get the table of the Grundy value of Ry¯ u¯

  • Nim

▶ Table of ((x + y) mod 3) + 3(⌊ x 3⌋ ⊕ ⌊ y 3⌋)

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 12 / 25

slide-13
SLIDE 13 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Grundy value of Ry¯ u¯

  • Nim

Definition (Grundy value)

Let G be an impartial game position. The Grundy value G(G) is defined as G(G) = mex{G(G ′) | G ′ ∈ G}. Therefore, we found that the Grundy value of Ry¯ u¯

  • Nim can be

expressed as follows:

Theorem

Let (x, y) be a Ry¯ u¯

  • Nim position, then we have

G(x, y) = ((x + y) mod 3) + 3(⌊ x

3⌋ ⊕ ⌊ y 3⌋).

The Grundy value of Wythoff’s Nim position is not known, but we were able to obtain the Grundy value of Ry¯ u¯

  • Nim position.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 13 / 25

slide-14
SLIDE 14 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Generalized Ry¯ u¯

  • Nim

Restrict the diagonal movement by p ∈ Z>1. (The total number of tokens removed from the both heaps at once must be less than p.)

p-1

If p = 3, then this game is equivalent to Ry¯ u¯

  • Nim.

If p = 4, it will be a movement like adding a movement of Knight to Ryuo.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 14 / 25

slide-15
SLIDE 15 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Restrict the diagonal movement version

The Grundy value of this game position turned out to be as follows:

Theorem

Let (x, y) be a Generalized Ry¯ u¯

  • Nim position, then we have

G(x, y) = ((x + y) mod p) + p(⌊ x

p⌋ ⊕ ⌊ y p⌋) (p ∈ Z>1).

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 15 / 25

slide-16
SLIDE 16 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Generalized Ry¯ u¯

  • Nim

Restrict the diagonal movement by p ∈ Z>1 and side movement by q ∈ Z>1. (It is possible to take up to a total of p tokens when taking them at

  • nce and up to q tokens when taking them from one heaps.)

q-1 p-1

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 16 / 25

slide-17
SLIDE 17 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Restrict the diagonal and side movement version

In this case, Grundy value is known only in the following cases:

Theorem

If q ≡ 0 (mod p), then we have G(x, y) = ((x mod q + y mod q) mod p) +p(⌊ x mod q

p

⌋ ⊕ ⌊ y mod q

p

⌋)

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 17 / 25

slide-18
SLIDE 18 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Restrict the diagonal and side movement version

Theorem

If q ≡ 1 (mod p), then we have (1) x ≡ 0 (mod q), y ≡ 0 (mod q), x ̸= 0, y ̸= 0, G(x, y) = q (2) Otherwise G(x, y) = ((x mod q + y mod q) mod p) +p(⌊ x mod q

p

⌋ ⊕ ⌊ y mod q

p

⌋) In other case, it becomes complicated and generally difficult.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 18 / 25

slide-19
SLIDE 19 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Restrict the diagonal and side movement version

Restrict the diagonal movement by p ∈ Z>1, the horizontal movement by q ∈ Z>1 and the vertical movement by r ∈ Z>1.

Theorem

If q ≡ 0 (mod p) and r ≡ 0 (mod p), then we have G(x, y) = ((x mod q + y mod r) mod p) +p(⌊x mod q

p

⌋ ⊕ ⌊ y mod r

p

⌋)

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 19 / 25

slide-20
SLIDE 20 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

3-dimensional Ry¯ u¯

  • Nim

3-dimensional Ry¯ u¯

  • Nim is an impartial game with three heaps of
  • tokens. The rules are as follows:

The legal move is to remove any number of tokens from a single heap (as in Nim) or

remove one token from any two heaps or

remove one token from all the three heaps. The end position is the state of no tokens in the three heaps.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 20 / 25

slide-21
SLIDE 21 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The P-positions of 3-dimensional Ry¯ u¯

  • Nim

We could not get the indication of Grundy value for 3-dimensional Ry¯ u¯

  • Nim but we get the P-positions as shown in this theorem.

Theorem

Let (x, y, z) be a 3-dimensional Ry¯ u¯

  • Nim position.

The P-positions of 3-dimensional Ry¯ u¯

  • Nim are given as follows:

(x + y + z) ≡ 0 (mod 3), and moreover (A) If x ≡ y ≡ z ≡ 1 (mod 3), then ⌊ x

3⌋ ⊕ ⌊ y 3⌋ ⊕ ⌊ z 3⌋ ⊕ 1 = 0

(B) Otherwise ⌊ x

3⌋ ⊕ ⌊ y 3⌋ ⊕ ⌊ z 3⌋ = 0.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 21 / 25

slide-22
SLIDE 22 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

3-dimensional Ry¯ u¯

  • Nim

・Let’s change the rule of 3-dimensional Ry¯ u¯

  • Nim as follows:

(We will eliminate the rule of taking tokens one by one from the three heaps.) 3-dimensional Ry¯ u¯

  • Nim is an impartial game with three heaps of
  • tokens. The rules are as follows:

The legal move is to remove any number of tokens from a single heap (as in Nim) or

remove one token from any two heaps or

remove one token from all the three heaps. The end position is the state of no tokens in the three heaps.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 22 / 25

slide-23
SLIDE 23 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Grundy value of 3-dimensional Ry¯ u¯

  • Nim

Then, we can obtain the Grundy value of this game as follows:

Theorem

Let (x, y, z) be a 3-dimensional Ry¯ u¯

  • Nim position, then we have

G(x, y, z) = ((x + y + z) mod 3) + 3(⌊ x

3⌋ ⊕ ⌊ y 3⌋ ⊕ ⌊ z 3⌋).

We considered that this could be expanded and made the following conjecture:

Conjecture

Let (x1, . . . , xn) be a n-dimensional Ry¯ u¯

  • Nim position, then we have

G(x1, . . . , xn) = ((x1 + · · · + xn) mod 3) + 3(⌊ x1

3 ⌋ ⊕ · · · ⊕ ⌊ xn 3 ⌋).

In the near future, We’d like to consider whether or not it will be expanded.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 23 / 25

slide-24
SLIDE 24 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

References

▶ Wythoff, W. A ., A Modication of the Game of Nim, Nieuw

Arch, Wisk. 8, 1907/1909.

▶ J. H. Conway, On Numbers And Games (second edition),A. K.

Peters, 2001.

▶ E. R. Berlekamp, J. H. Conway, R. K. Guy, Winning Ways for

Your Mathematical Plays,Vols. 1–4, A. K. Peters, 2001–2004.

▶ Michael H. Albert, Richard J. Nowakowski, David Wolfe, Lessons

in Play, An Introduction to Combinatorial Game Theory, A. K. Peters 2007.

▶ A. N. Siegel, Combinatorial Game Theory, American

Mathematical Society, 2013.

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 24 / 25

slide-25
SLIDE 25 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Thank you!

Tomoaki Abuku (University of Tsukuba) Ry¯ u¯

  • Nim

23–25th October, 2017 25 / 25