83
Jim and Nim Japheth Wood New York Math Circle August 6, 2011

Jim and Nim - · PDF file01100 01101 01110 01111 11000 11001 11010 11011 11100 11101 11110 11111. 13 = 8+4+1 = 011012 0 1 1 0 1 16 8 4 2 1 24 23 22 21 20

  • Upload
    phamdat

  • View
    219

  • Download
    3

Embed Size (px)

Citation preview

Jim and Nim

Japheth WoodNew York Math Circle

August 6, 2011

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

Outline

1. Games

2. Nim

3. Strategies

4. Jim

5. The Winning Strategy for Nim

6. Addition of Games

7. Equivalence of Games

8. The Sprague-Grundy Theorem

But First . . .

1 3 5 79 11 13 1517 19 21 2325 27 29 31

2 3 6 710 11 14 1518 19 22 2326 27 30 31

4 5 6 712 13 14 1520 21 22 2328 29 30 31

8 9 10 1112 13 14 1524 25 26 2728 29 30 31

16 17 18 1920 21 22 2324 25 26 2728 29 30 31

13 =

8 + 4 + 1 = 011012

0 1 1 0 116 8 4 2 124 23 22 21 20

8 9 10 1112 13 14 1524 25 26 2728 29 30 31

01000 01001 01010 0101101100 01101 01110 0111111000 11001 11010 1101111100 11101 11110 11111

13 = 8 + 4 + 1

= 011012

0 1 1 0 116 8 4 2 124 23 22 21 20

8 9 10 1112 13 14 1524 25 26 2728 29 30 31

01000 01001 01010 0101101100 01101 01110 0111111000 11001 11010 1101111100 11101 11110 11111

13 = 8 + 4 + 1 = 011012

0 1 1 0 116 8 4 2 124 23 22 21 20

8 9 10 1112 13 14 1524 25 26 2728 29 30 31

01000 01001 01010 0101101100 01101 01110 0111111000 11001 11010 1101111100 11101 11110 11111

13 = 8 + 4 + 1 = 011012

0 1 1 0 116 8 4 2 1

24 23 22 21 20

8 9 10 1112 13 14 1524 25 26 2728 29 30 31

01000 01001 01010 0101101100 01101 01110 0111111000 11001 11010 1101111100 11101 11110 11111

13 = 8 + 4 + 1 = 011012

0 1 1 0 116 8 4 2 124 23 22 21 20

8 9 10 1112 13 14 1524 25 26 2728 29 30 31

01000 01001 01010 0101101100 01101 01110 0111111000 11001 11010 1101111100 11101 11110 11111

13 = 8 + 4 + 1 = 011012

0 1 1 0 116 8 4 2 124 23 22 21 20

8 9 10 1112 13 14 1524 25 26 2728 29 30 31

01000 01001 01010 0101101100 01101 01110 0111111000 11001 11010 1101111100 11101 11110 11111

Express in Binary

6 =

4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 +

2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2

= 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20

= 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 =

4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 +

1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1

= 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20

= 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 =

2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 +

1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1

= 0 · 22 + 1 · 21 + 1 · 20 = 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20

= 0112

Express in Binary

6 = 4 + 2 = 1 · 22 + 1 · 21 + 0 · 20 = 1102

5 = 4 + 1 = 1 · 22 + 0 · 21 + 1 · 20 = 1012

3 = 2 + 1 = 0 · 22 + 1 · 21 + 1 · 20 = 0112

Which is Bigger?

Base 10: 1894 or 2011 1920 or 1993

Base 2: 00101 or 10101 10101 or 10011

Which is Bigger?

Base 10:

1894 or 2011 1920 or 1993

Base 2: 00101 or 10101 10101 or 10011

Which is Bigger?

Base 10: 1894 or 2011

1920 or 1993

Base 2: 00101 or 10101 10101 or 10011

Which is Bigger?

Base 10: 1894 or 2011 1920 or 1993

Base 2: 00101 or 10101 10101 or 10011

Which is Bigger?

Base 10: 1894 or 2011 1920 or 1993

Base 2:

00101 or 10101 10101 or 10011

Which is Bigger?

Base 10: 1894 or 2011 1920 or 1993

Base 2: 00101 or 10101

10101 or 10011

Which is Bigger?

Base 10: 1894 or 2011 1920 or 1993

Base 2: 00101 or 10101 10101 or 10011

And now back to our talk . . .

• • •• • •• • •

• • •• • •• • •

• • •• • •• • •

• • •• • •• • •

• • •• • •• • •

Nim

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Who has the winning strategy?

Nim Challenges

Which two pile Nim games are L positions?

W and L games

L

WWWW

W

WL WW

W and L games

L

WWWWW

WL WW

W and L games

L W

L W

W and L games

L W

L W

W and L games

L W

Jim • • •• • •• • •

Jim Challenges

• •Who has the winning strategy?

Jim Challenges

• •Who has the winning strategy?

Jim Challenges

• •Who has the winning strategy?

Jim Challenges

• •Who has the winning strategy?

Jim Challenges

• • •Who has the winning strategy?

Jim Challenges

• • •• • •

Who has the winning strategy?

Jim Challenges

• • •• • •

Who has the winning strategy?

Jim Challenges

• • •• • •

Who has the winning strategy?

Jim Challenges

• • •• • •

Who has the winning strategy?

Jim Challenges

Which two row Jim games are L positions?

3-Row Jim

• • •• • •• • •

Show this is an L position.

3-Row Jim

• • •• • •• • •

Goal: Describe all 3-Row Jim L positions.

Jim and Nim

Can a Strategy for Jim help solve Nim?

Jim and Nim

• • •• • •• • •

6 | 5 | 31 1 0

1 0 1

0 1 1

Can a Strategy for Jim help solve Nim?

Thank You!

Nim and JimJapheth Wood, New York Math Circle

[email protected]

Some Games Collected by David Hankin

There are 5 checkers on a table. A move consists of taking one ortwo checkers from the table. The winner is the one who takes thelast checker.

Some Games Collected by David Hankin

There are 100 checkers on a table. A move consists of taking mcheckers from the table, where m is a positive integer power of 2.The winner is the one who takes the last checker. Find the set L oflosing positions.

Some Games Collected by David Hankin

There are 100 checkers on a table. A move consists of taking mcheckers from the table, where m is a prime or m = 1. The winneris the one who takes the last checker. Find the set L of losingpositions.

Some Games Collected by David Hankin

There are 100 checkers on a table. A move consists of taking 1, 3,or 8 checkers from the table. The winner is the one who takes thelast checker. Find the set L of losing positions.

Some Games Collected by David Hankin

There are two piles of checkers on a table. A move consists oftaking any number of checkers from one pile or the same numberof checkers from each. The winner is the one who takes the lastchecker. Find the set L of losing positions.

Some Games Collected by David Hankin

Given an initial integer n0 > 1, two players, A and B, chooseintegers n1, n2, n3, . . . alternately according to the following rules.Knowing n2k , A chooses any integer n2k+1 such thatn2k ≤ n2k+1 ≤ n2

2k . Knowing n2k+1, B chooses any integer n2k+2

such that n2k+1/n2k+2 is a positive power of a prime. Player Awins by choosing the number 1990, player B wins by choosing thenumber 1. For which n0 does

A have a winning strategy,

B have a winning strategy,

neither player have a winning strategy?