Pre-Grundy Games Games And Graphs Workshop 2017 In collaboration - - PowerPoint PPT Presentation

pre grundy games
SMART_READER_LITE
LIVE PREVIEW

Pre-Grundy Games Games And Graphs Workshop 2017 In collaboration - - PowerPoint PPT Presentation

Octal Games Pre-Grundy Games thks Pre-Grundy Games Games And Graphs Workshop 2017 In collaboration with : Eric Duch ene, Antoine Dailly and Urban Larsson Gabrielle Paris 1/26 Octal Games Pre-Grundy Games thks Are Pre-Grundy games


slide-1
SLIDE 1

Octal Games Pre-Grundy Games thks

Pre-Grundy Games

Games And Graphs Workshop 2017 In collaboration with : ´ Eric Duchˆ ene, Antoine Dailly and Urban Larsson Gabrielle Paris

1/26

slide-2
SLIDE 2

Octal Games Pre-Grundy Games thks

Are Pre-Grundy games boring ?

2/26

slide-3
SLIDE 3

Octal Games Pre-Grundy Games thks

Sommaire

1

Octal Games

2

Pre-Grundy Games

3/26

slide-4
SLIDE 4

Octal Games Pre-Grundy Games thks

Definition

Octal games: [Winning Ways] A game played on heaps where each player: 1. 2. 3.

4/26

slide-5
SLIDE 5

Octal Games Pre-Grundy Games thks

Definition

Octal games: [Winning Ways] A game played on heaps where each player:

  • 1. removes all the tokens of a heap, or

1. 2. 3.

4/26

slide-6
SLIDE 6

Octal Games Pre-Grundy Games thks

Definition

Octal games: [Winning Ways] A game played on heaps where each player:

  • 1. removes all the tokens of a heap, or
  • 2. removes only some, at the end, or

1. 2. 3.

4/26

slide-7
SLIDE 7

Octal Games Pre-Grundy Games thks

Definition

Octal games: [Winning Ways] A game played on heaps where each player:

  • 1. removes all the tokens of a heap, or
  • 2. removes only some, at the end, or
  • 3. removes only some in the middle

1. 2. 3.

4/26

slide-8
SLIDE 8

Octal Games Pre-Grundy Games thks

Definition

Octal games: [Winning Ways] A game played on heaps where each player:

  • 1. removes all the tokens of a heap, or
  • 2. removes only some, at the end, or
  • 3. removes only some in the middle

Coded by an octal number 0.d1 . . . dt 1. 2. 3.

4/26

slide-9
SLIDE 9

Octal Games Pre-Grundy Games thks

Example of octal games

  • Nim: 0.33333333333333333...

1. 2. 3.

5/26

slide-10
SLIDE 10

Octal Games Pre-Grundy Games thks

Example of octal games

  • Nim: 0.33333333333333333...

1. 2. 3.

5/26

slide-11
SLIDE 11

Octal Games Pre-Grundy Games thks

Example of octal games

  • Nim: 0.33333333333333333...
  • Kayles: 0.77.

1. 2. 3.

5/26

slide-12
SLIDE 12

Octal Games Pre-Grundy Games thks

Example of octal games

  • Nim: 0.33333333333333333...
  • Kayles: 0.77.

1. 2. 3.

5/26

slide-13
SLIDE 13

Octal Games Pre-Grundy Games thks

Example of octal games

  • Nim: 0.33333333333333333...
  • Kayles: 0.77.
  • Dawson Chess: 0.137.

1. 2. 3.

5/26

slide-14
SLIDE 14

Octal Games Pre-Grundy Games thks

Example of octal games

  • Nim: 0.33333333333333333...
  • Kayles: 0.77.
  • Dawson Chess: 0.137.

1. 2. 3.

5/26

slide-15
SLIDE 15

Octal Games Pre-Grundy Games thks

Example of octal games

  • Nim: 0.33333333333333333...
  • Kayles: 0.77.
  • Dawson Chess: 0.137.

1. 2. 3. Conjecture (Guy) Octal games with finite code have a Grundy sequence ultimately periodic.

5/26

slide-16
SLIDE 16

Octal Games Pre-Grundy Games thks

Hexadecimal games

Why stop at two heaps ? 4.

6/26

slide-17
SLIDE 17

Octal Games Pre-Grundy Games thks

Hexadecimal games

Why stop at two heaps ? 4. 5. ⇒ we can simply generalize to leaving any number of heaps...

6/26

slide-18
SLIDE 18

Octal Games Pre-Grundy Games thks

Grundy sequences

5 10 15 20 5 10 15

Game 0.F2 : periodic

7/26

slide-19
SLIDE 19

Octal Games Pre-Grundy Games thks

Grundy sequences

5 10 15 20 5 10 15

Game 0.17FF : arithmetic-periodic

7/26

slide-20
SLIDE 20

Octal Games Pre-Grundy Games thks

Periodicity and arithmetic-periodicity results

Theorem (WW) Let H be the hexadecimal game 0.d1 . . . dt. If there exist e and p such that: ∀e < n ≤ 3(e + p) + t, G(n + p) = G(n) then the Grundy sequence of H is periodic of period p and with pre-period e.

8/26

slide-21
SLIDE 21

Octal Games Pre-Grundy Games thks

Periodicity and arithmetic-periodicity results

Theorem (WW) Let H be the hexadecimal game 0.d1 . . . dt. If there exist e and p such that: ∀e < n ≤ 3(e + p) + t, G(n + p) = G(n) then the Grundy sequence of H is periodic of period p and with pre-period e. Theorem (R. Nowakowski) Let H be the hexadecimal game 0.d1 . . . dt. If there exist e, 3p ≥ t + 2, s = 2γ−1 + j, j < 2γ−1 such that:

  • 1. ∀e < n < t+αe,γ,jp,

G(n + p) = G(n) + s,

  • 2. G(0, e) ⊂ 0, s − 1 and G(0, e + p) ⊂ 0, 2s − 1,
  • 3. ∃d2v+1, dv ≥ 8, ∀g ∈ 0, 2s − 1, ∃n > 0,G(n) = g or

∃du ≥ 8, ∀g ∈ 0, 2s − 1, ∃2v + 1, 2w ≥ 0,G(2v + 1) = G(2w) = g, then the Grundy sequence of H is arithmetic-periodic of period p, pre-period e and saltus s.

8/26

slide-22
SLIDE 22

Octal Games Pre-Grundy Games thks

Periodicity and arithmetic-periodicity results

Theorem (WW) Let H be the hexadecimal game 0.d1 . . . dt. If there exist e and p such that: ∀e < n ≤ 3(e + p) + t, G(n + p) = G(n) then the Grundy sequence of H is periodic of period p and with pre-period e. Theorem (R. Nowakowski) Let H be the hexadecimal game 0.d1 . . . dt. If there exist e, 3p ≥ t + 2, s = 2γ−1 + j, j < 2γ−1 such that:

  • 1. ∀e < n < t+αe,γ,jp,

G(n + p) = G(n) + s,

  • 2. G(0, e) ⊂ 0, s − 1 and G(0, e + p) ⊂ 0, 2s − 1,
  • 3. ∃d2v+1, dv ≥ 8, ∀g ∈ 0, 2s − 1, ∃n > 0,G(n) = g or

∃du ≥ 8, ∀g ∈ 0, 2s − 1, ∃2v + 1, 2w ≥ 0,G(2v + 1) = G(2w) = g, then the Grundy sequence of H is arithmetic-periodic of period p, pre-period e and saltus s.

8/26

slide-23
SLIDE 23

Octal Games Pre-Grundy Games thks

Sommaire

1

Octal Games

2

Pre-Grundy Games

9/26

slide-24
SLIDE 24

Octal Games Pre-Grundy Games thks

Grundy’s Game

A move consists in taking a heap and splitting it into two non-empty heaps of different sizes. No removing allowed.

1 1

10/26

slide-25
SLIDE 25

Octal Games Pre-Grundy Games thks

Grundy’s Game

A move consists in taking a heap and splitting it into two non-empty heaps of different sizes. No removing allowed.

1 1

Conjecture (Belekamp, Conway, Guy) The Grundy sequence of Grundy’s game is ultimately periodic. Remark: 235 first values computed (Flammenkamp) without any further clue...

10/26

slide-26
SLIDE 26

Octal Games Pre-Grundy Games thks

Pre-Grundy Games

Definition Let L = {ℓ1, . . . , ℓk} be a list of positive integers. A move on the game PreG(L) consist on splitting a heap of n ≥ ℓj tokens into ℓj + 1 non-empty heaps. L = {1, 3}

1 2 3 1

11/26

slide-27
SLIDE 27

Octal Games Pre-Grundy Games thks

Behavior

5 10 15 20 3

L = {1, 3} : P p = 2

5 10 15 20 5 9

L = {1, 3, 4} : AP p = 4; s = 2

12/26

slide-28
SLIDE 28

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. First: G(n) ≥ a.

13/26

slide-29
SLIDE 29

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. First: G(n) ≥ a.

  • ℓ1 even:

Oℓ1 = (iℓ1 + b + 1, a − i, . . . , a − i) G(Oℓ1) = G(iℓ1 + b + 1) = i

13/26

slide-30
SLIDE 30

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. First: G(n) ≥ a.

  • ℓ1 odd:

− if a − i odd: Oℓ1 =

  • iℓ1 + b + 1, 1, a − i − 1

2 ℓ1 + 1, a − i − 1 2 ℓ1 + 1, 1, . . . , 1

  • G(Oℓ1) = G(iℓ1 + b + 1) ⊕ G(1) = i

13/26

slide-31
SLIDE 31

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. First: G(n) ≥ a.

  • ℓ1 odd:

− if a − i even: Oℓ1 =

  • iℓ1 + b + 1, 2, a − i − 1

2 ℓ1 + 1 2, a − i − 1 2 ℓ1 + 1 2, 1, . . . , 1

  • G(Oℓ1) = G(iℓ1 + b + 1) ⊕ G(2) = i

13/26

slide-32
SLIDE 32

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. First: G(n) ≥ a. In all cases G(Oℓ1) = i for i < a ⇒ G(n) ≥ a.

13/26

slide-33
SLIDE 33

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. Second: G(n) ≤ a. Assume G(Oℓ) = a for some option of n.

14/26

slide-34
SLIDE 34

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. Second: G(n) ≤ a. Assume G(Oℓ) = a for some option of n. Oℓ = (a0ℓ1 + b0 + 1, . . . , aℓℓ1 + bℓ + 1)

14/26

slide-35
SLIDE 35

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. Second: G(n) ≤ a. Assume G(Oℓ) = a for some option of n. Oℓ = (a0ℓ1 + b0 + 1, . . . , aℓℓ1 + bℓ + 1)

  • G(Oℓ) = a

⇒ ai = a

14/26

slide-36
SLIDE 36

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. Second: G(n) ≤ a. Assume G(Oℓ) = a for some option of n. Oℓ = (a0ℓ1 + b0 + 1, . . . , aℓℓ1 + bℓ + 1)

  • G(Oℓ) = a

⇒ ai = a

  • aℓ1 + b + 1 = aiℓ1 + bi + 1

⇒ ai ≤ a

14/26

slide-37
SLIDE 37

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) Proofs: For L = {ℓ1, . . . , ℓk}, ℓi > 1. For n = aℓ1 + b + 1, b < ℓ1, let us prove that G(n) = a. Second: G(n) ≤ a. Assume G(Oℓ) = a for some option of n. Oℓ = (a0ℓ1 + b0 + 1, . . . , aℓℓ1 + bℓ + 1)

  • G(Oℓ) = a

⇒ ai = a

  • aℓ1 + b + 1 = aiℓ1 + bi + 1

⇒ ai ≤ a ⇒ ai = a and b ≥ ℓ ≥ ℓ1... absurd.

14/26

slide-38
SLIDE 38

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1)

15/26

slide-39
SLIDE 39

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) {1, ℓ2, . . . , ℓk}(ℓi odd ) P (01)∗

15/26

slide-40
SLIDE 40

Octal Games Pre-Grundy Games thks

Firsts results

L = {ℓ1, . . . , ℓk} type Sequence 1 / ∈ L AP (0)ℓ1 (+1) {1, ℓ2, . . . , ℓk}(ℓi odd ) P (01)∗ {1, 2, 3, ℓ4, . . . , ℓk} AP (0)1 (+1) {1, 3, 2ℓ}(ℓ ≥ 2) AP (01)ℓ (+2)

15/26

slide-41
SLIDE 41

Octal Games Pre-Grundy Games thks

Main result: arithmetic-periodicity test

Definition The game PreG({ℓ1, . . . , ℓk}), ℓk ≥ 2, satisfies the test AP if there exists p > 0 and s = 2j such that:

  • AP1. For n ≤ 3p, G(n + p) = G(n) + s
  • AP2. G(1, p) = 0, s − 1
  • AP3. For n ∈ 3p + 1, 4p, g ∈ 0, s − 1, there is an option Oℓ,n of n

such that G(Oℓ,n) = g and ℓ ≥ 2.

0p + 1 0s 1p + 1 1s 2p + 1 2s 3p + 1 3s 4p + 1 4s n ℓ ≥ 2

16/26

slide-42
SLIDE 42

Octal Games Pre-Grundy Games thks

Main result: arithmetic-periodicity test

Definition The game PreG({ℓ1, . . . , ℓk}), ℓk ≥ 2, satisfies the test AP if there exists p > 0 and s = 2j such that:

  • AP1. For n ≤ 3p, G(n + p) = G(n) + s
  • AP2. G(1, p) = 0, s − 1
  • AP3. For n ∈ 3p + 1, 4p, g ∈ 0, s − 1, there is an option Oℓ,n of n

such that G(Oℓ,n) = g and ℓ ≥ 2.

0p + 1 0s 1p + 1 1s 2p + 1 2s 3p + 1 3s 4p + 1 4s n ℓ ≥ 2

Remarks:

  • Sometimes (AP1 and AP2) ⇒ AP3.

16/26

slide-43
SLIDE 43

Octal Games Pre-Grundy Games thks

AP-Theorem

Theorem Let L = {ℓ1, . . . , ℓk}, ℓk ≥ 2, such that PreG(L) verifies the AP-test. Then for all n ≥ 1, G(n + p) = G(n) + s.

17/26

slide-44
SLIDE 44

Octal Games Pre-Grundy Games thks

AP-Theorem

Theorem Let L = {ℓ1, . . . , ℓk}, ℓk ≥ 2, such that PreG(L) verifies the AP-test. Then for all n ≥ 1, G(n + p) = G(n) + s. Let us show that for n = ap + 1 + b: (A) G(n) = as + G(1 + b) (B) for g ∈ 0, (a − 1)s − 1, ∃Oℓ,n of n, with ℓ ≥ 2 and G(Oℓ,n) = g.

17/26

slide-45
SLIDE 45

Octal Games Pre-Grundy Games thks

AP-Theorem

Theorem Let L = {ℓ1, . . . , ℓk}, ℓk ≥ 2, such that PreG(L) verifies the AP-test. Then for all n ≥ 1, G(n + p) = G(n) + s. Let us show that for n = ap + 1 + b: (A) G(n) = as + G(1 + b) (B) for g ∈ 0, (a − 1)s − 1, ∃Oℓ,n of n, with ℓ ≥ 2 and G(Oℓ,n) = g. (Almost) clear for n ≤ 4: Lemma If n ≤ 4p, then n verifies (B). Let n ≥ 4p.

17/26

slide-46
SLIDE 46

Octal Games Pre-Grundy Games thks

Proof: G(n) ≤ as + G(1 + b)

(A) G(n) = as + G(1 + b) (B) for g ∈ 0, (a − 1)s − 1, ∃Oℓ,n of n, with ℓ ≥ 2 and G(Oℓ,n) = g.

0p + 1 0s 1p + 1 1s 2p + 1 2s (a − 2)p + 1 (a − 2)s (a − 1)p + 1 (a − 1)s ap + 1 as n as + G(1 + b) n − 2p (a − 2)s + G(1 + b)

X G(Oℓ,n) = as + G(1 + b) ⇒ ∃Oℓ,n−2p, G(Oℓ,n−2p) = G(n − 2p)...

18/26

slide-47
SLIDE 47

Octal Games Pre-Grundy Games thks

Proof: G(n) ≥ (a − 1)s

(A) G(n) = as + G(1 + b) (B) for g ∈ 0, (a − 1)s − 1, ∃Oℓ,n of n, with ℓ ≥ 2 and G(Oℓ,n) = g.

0p + 1 0s 1p + 1 1s 2p + 1 2s (a − 3)p + 1 (a − 3)s (a − 2)p + 1 (a − 2)s (a − 1)p + 1 (a − 1)s ap + 1 as n n − 2p n − 2p n ℓ ≥ 2

G(Oℓ,n−2p) = g, g < (a − 3)s, ℓ ≥ 2 ⇒ ∃Oℓ,n, G(Oℓ,n) = g

19/26

slide-48
SLIDE 48

Octal Games Pre-Grundy Games thks

Proof: G(n) ≥ (a − 1)s

(A) G(n) = as + G(1 + b) (B) for g ∈ 0, (a − 1)s − 1, ∃Oℓ,n of n, with ℓ ≥ 2 and G(Oℓ,n) = g.

0p + 1 0s 1p + 1 1s 2p + 1 2s (a − 3)p + 1 (a − 3)s (a − 2)p + 1 (a − 2)s (a − 1)p + 1 (a − 1)s ap + 1 as n n − 2p n − 2p n ℓ ≥ 2

G(Oℓ,n−2p) = g, g < (a − 3)s, ℓ ≥ 2 ⇒ ∃Oℓ,n, G(Oℓ,n) = g + 2s Moreover, n verifies (B).

20/26

slide-49
SLIDE 49

Octal Games Pre-Grundy Games thks

Proof: G(n) ≥ as + G(1 + b)

(A) G(n) = as + G(1 + b) (B) for g ∈ 0, (a − 1)s − 1, ∃Oℓ,n of n, with ℓ ≥ 2 and G(Oℓ,n) = g.

0p + 1 0s 1p + 1 1s 2p + 1 2s (a − 3)p + 1 (a − 3)s (a − 2)p + 1 (a − 2)s (a − 1)p + 1 (a − 1)s ap + 1 as n n − (a − 1)p n − (a − 1)p n

G(Oℓ,n−(a−1)p) = g, g < s + G(1 + b) ⇒ ∃Oℓ,n, G(Oℓ,n) = g + (a − 1)s ⇒ n verifies also (A)

21/26

slide-50
SLIDE 50

Octal Games Pre-Grundy Games thks

Conjectures and remarks

In summary: L = {ℓ1, . . . , ℓk} type Sequence S 1 / ∈ L AP (0)ℓ1 (+1)

  • {1, ℓ2, . . . , ℓk}(ℓi odd )

P (01)∗

  • {1, 2, 3, ℓ4, . . . , ℓk}

AP (0)1 (+1)

  • {1, 3, 2ℓ}(ℓ ≥ 2)

AP (01)ℓ (+2)

  • {1, 2ℓ}(ℓ ≥ 2)

AP (01)ℓ(23)ℓ14(54)ℓ−1(32)ℓ(45)ℓ(67)ℓ (+8) C {1, 2ℓ1, 2ℓ2 + 1}, ℓi > 1 AP (01)ℓ1 (+2) C Conjectures:

  • 1. {1, 2ℓ}, ℓ ≥ 2 : OK for ℓ ∈ {2, 3, 4} by AP-test
  • 2. ℓ1, ℓ2 > 1, {1, 2ℓ1, 2ℓ2 + 1} : OK for {1, 4, 5}, {1, 4, 7}, {1, 5, 6} by AP-test

22/26

slide-51
SLIDE 51

Octal Games Pre-Grundy Games thks

Conjectures and remarks

In summary: L = {ℓ1, . . . , ℓk} type Sequence S 1 / ∈ L AP (0)ℓ1 (+1)

  • {1, ℓ2, . . . , ℓk}(ℓi odd )

P (01)∗

  • {1, 2, 3, ℓ4, . . . , ℓk}

AP (0)1 (+1)

  • {1, 3, 2ℓ}(ℓ ≥ 2)

AP (01)ℓ (+2)

  • {1, 2ℓ}(ℓ ≥ 2)

AP (01)ℓ(23)ℓ14(54)ℓ−1(32)ℓ(45)ℓ(67)ℓ (+8) C {1, 2ℓ1, 2ℓ2 + 1}, ℓi > 1 AP (01)ℓ1 (+2) C {1, 2} ??? ??? Conjectures:

  • 1. {1, 2ℓ}, ℓ ≥ 2 : OK for ℓ ∈ {2, 3, 4} by AP-test
  • 2. ℓ1, ℓ2 > 1, {1, 2ℓ1, 2ℓ2 + 1} : OK for {1, 4, 5}, {1, 4, 7}, {1, 5, 6} by AP-test

22/26

slide-52
SLIDE 52

Octal Games Pre-Grundy Games thks

L = {1, 2}

10 20 30 40 50 60 70 80 90 100 5 10 15 20 25 30 35 40 45 50

23/26

slide-53
SLIDE 53

Octal Games Pre-Grundy Games thks

L = {1, 2}

500 1000 1500 2000 2500 3000 3500 4000 500 1000 1500 2000

24/26

slide-54
SLIDE 54

Octal Games Pre-Grundy Games thks

...maybe not!

25/26

slide-55
SLIDE 55

Octal Games Pre-Grundy Games thks

Thank you!

26/26