Mathematics and Games
Parker Glynn-Adey
University of Toronto
March 23, 2014
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 1 / 28
Outline
1 What are games?
2 The 15 Game
3 Nim
4 A Safari in the Land of Games
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 2 / 28
This is not a game.(Although, there is a lot of mathematics in Angry Birds.)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 3 / 28
This is not a game.
(Although, there is a lot of mathematics in Angry Birds.)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 3 / 28
This is not a game.(Although, there is a lot of mathematics in Angry Birds.)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 3 / 28
Backgammon (∼1100AD) and Poker (∼1850AD).
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 4 / 28
Backgammon (∼1100AD) and Poker (∼1850AD).
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 4 / 28
Chess (∼1400AD) and Go (∼2000BC)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 5 / 28
Chess (∼1400AD) and Go (∼2000BC)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 5 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.
Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.
Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.
Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:2 3 4 5 6 8 9 (L = ,R = )
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:1 2 3 4 5 6 7 8 9 (L = 0,R = 0)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:1 2 3 4 5 6 7 8 9 (L = 0,R = 0)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:1 2 3 4 5 6 7 8 9 (L = 0,R = 0)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:
�A1 2 3 4 5 6 7 8 9 (L = 0,R = 1)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:
�A1 2 3 4 5 6 �A7 8 9 (L = 7,R = 1)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Rules of The 15 Game (A Toy Game)
Players: Two.Goal: To collect up numbers adding up to 15.Setup: Write the numbers one through nine on a piece of paper.Play:
Players alternate taking turns.
Both players start with total zero.
On your turn: cross out a number, and add it to your total.
If your total is 15, you win.
Example:
�A1 2 3 4 5 6 �A7 8 9 (L = 7,R = 1)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 6 / 28
Observations:
Sometimes no one wins.
5 is a good opening move.
The Fifteen Game feels oddly familiar.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 7 / 28
Observations:
Sometimes no one wins.
5 is a good opening move.
The Fifteen Game feels oddly familiar.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 7 / 28
Observations:
Sometimes no one wins.
5 is a good opening move.
The Fifteen Game feels oddly familiar.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 7 / 28
Observations:
Sometimes no one wins.
5 is a good opening move.
The Fifteen Game feels oddly familiar.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 7 / 28
8 1 63 5 74 9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1
6
3 5 74 9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1
6
3
5
74 9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1
6
3
5
74 9
2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1
6
3
5 7
4 9
2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1
63 5 7
4 9
2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1
63 5 7
4
9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8
1 63 5 7
4
9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1 63 5 7
4
9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1 63 5 74 9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
8 1 63 5 74 9 2
The 15 Game is Tic-Tac-Toe.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 8 / 28
Nim
Nim was the first game to be exhaustively analyzed mathematically.
In 1901, Charles Bouton published a solution to the game.This result started the field of mathematical game theory.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 9 / 28
Nim
Nim was the first game to be exhaustively analyzed mathematically.In 1901, Charles Bouton published a solution to the game.
This result started the field of mathematical game theory.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 9 / 28
Nim
Nim was the first game to be exhaustively analyzed mathematically.In 1901, Charles Bouton published a solution to the game.This result started the field of mathematical game theory.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 9 / 28
Rules of Nim
Players: Two.
Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.
Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)
Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)
R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0)
(Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Rules of Nim
Players: Two.Goal: To be the last player to pick up a stone.Setup: Lay out heaps of n1, n2, . . . , nk stones. (ni ≥ 0)Play:
Players alternate taking turns.
A move consists of removing at least one stone from a heap.
If you can’t move, you lose.
Example:
(1, 2)R (1, 1)
L (0, 1)
R (0, 0) (Left loses.)
Let’s play!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 10 / 28
Quiz!
Play and win: (10, 11).
Is (17, 0) a good position?Is (2, 2, 3, 3, 5) a good position?
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 11 / 28
Quiz!
Play and win: (10, 11).Is (17, 0) a good position?
Is (2, 2, 3, 3, 5) a good position?
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 11 / 28
Quiz!
Play and win: (10, 11).Is (17, 0) a good position?Is (2, 2, 3, 3, 5) a good position?
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 11 / 28
Observations:
Nim is tricky!
There are lots of options.
Empty heaps don’t matter.
A single heap is a good position.
Equal heaps ‘cancel out’.
Let’s solve Nim!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 12 / 28
Observations:
Nim is tricky!
There are lots of options.
Empty heaps don’t matter.
A single heap is a good position.
Equal heaps ‘cancel out’.
Let’s solve Nim!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 12 / 28
Observations:
Nim is tricky!
There are lots of options.
Empty heaps don’t matter.
A single heap is a good position.
Equal heaps ‘cancel out’.
Let’s solve Nim!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 12 / 28
Observations:
Nim is tricky!
There are lots of options.
Empty heaps don’t matter.
A single heap is a good position.
Equal heaps ‘cancel out’.
Let’s solve Nim!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 12 / 28
Observations:
Nim is tricky!
There are lots of options.
Empty heaps don’t matter.
A single heap is a good position.
Equal heaps ‘cancel out’.
Let’s solve Nim!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 12 / 28
Observations:
Nim is tricky!
There are lots of options.
Empty heaps don’t matter.
A single heap is a good position.
Equal heaps ‘cancel out’.
Let’s solve Nim!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 12 / 28
Observations:
Nim is tricky!
There are lots of options.
Empty heaps don’t matter.
A single heap is a good position.
Equal heaps ‘cancel out’.
Let’s solve Nim!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 12 / 28
A quick review of numbers
2014 = 2 · 1000 +
0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 +
1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 +
4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1
= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 +
0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 +
1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 +
4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
=
(2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
=
1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 +
512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 +
256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 +
128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 +
64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 +
16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 +
8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 +
4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 +
2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
=
210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 +
29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 +
28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 +
27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 +
26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 +
24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 +
23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 +
22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 +
21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
A quick review of numbers
2014 = 2 · 1000 + 0 · 100 + 1 · 10 + 4 · 1= 2 · 103 + 0 · 102 + 1 · 101 + 4 · 100
= (2, 0, 1, 4)10
= 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2
= 210 + 29 + 28 + 27 + 26 + 24 + 23 + 22 + 21
= (1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0)2
Theorem
Every number n can be written as a sum of powers of two in a unique way.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 13 / 28
Nim addition
We define the following operation on binary digits:
⊕ 0 1
0 0 11 1 0
Definition
For a pair of numbers n and m, write:
n = (nk , nk−1, . . . , n0)2 m = (mk ,mk−1, . . . ,m0)2
We define their Nim-sum:
n ⊕m = (nk ⊕mk , nk−1 ⊕mk−1, . . . , n0 ⊕m0)2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 14 / 28
Nim addition
We define the following operation on binary digits:
⊕ 0 1
0 0 11 1 0
Definition
For a pair of numbers n and m, write:
n = (nk , nk−1, . . . , n0)2 m = (mk ,mk−1, . . . ,m0)2
We define their Nim-sum:
n ⊕m = (nk ⊕mk , nk−1 ⊕mk−1, . . . , n0 ⊕m0)2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 14 / 28
Nim addition
We define the following operation on binary digits:
⊕ 0 1
0 0 11 1 0
Definition
For a pair of numbers n and m, write:
n = (nk , nk−1, . . . , n0)2 m = (mk ,mk−1, . . . ,m0)2
We define their Nim-sum:
n ⊕m = (nk ⊕mk , nk−1 ⊕mk−1, . . . , n0 ⊕m0)2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 14 / 28
Nim addition
We define the following operation on binary digits:
⊕ 0 1
0 0 11 1 0
Definition
For a pair of numbers n and m, write:
n = (nk , nk−1, . . . , n0)2 m = (mk ,mk−1, . . . ,m0)2
We define their Nim-sum:
n ⊕m = (nk ⊕mk , nk−1 ⊕mk−1, . . . , n0 ⊕m0)2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 14 / 28
Nim addition
We define the following operation on binary digits:
⊕ 0 1
0 0 11 1 0
Definition
For a pair of numbers n and m, write:
n = (nk , nk−1, . . . , n0)2 m = (mk ,mk−1, . . . ,m0)2
We define their Nim-sum:
n ⊕m = (nk ⊕mk , nk−1 ⊕mk−1, . . . , n0 ⊕m0)2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 14 / 28
Nim addition
We define the following operation on binary digits:
⊕ 0 1
0 0 11 1 0
Definition
For a pair of numbers n and m, write:
n = (nk , nk−1, . . . , n0)2 m = (mk ,mk−1, . . . ,m0)2
We define their Nim-sum:
n ⊕m = (nk ⊕mk , nk−1 ⊕mk−1, . . . , n0 ⊕m0)2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 14 / 28
Examples of Nim Addition
3⊕ 2 =
(2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
=
(1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1,
1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 =
(4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1,
0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0,
1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
Examples of Nim Addition
3⊕ 2 = (2 + 1)⊕ (2)
= (1, 1)2 ⊕ (1, 0)2
= (1⊕ 1, 1⊕ 0)2
= (0, 1)2
= 1
5⊕ 5 = (4 + 1)⊕ (4 + 1)
= (1, 0, 1)2 ⊕ (1, 0, 1)2
= (1⊕ 1, 0⊕ 0, 1⊕ 1)2
= (0, 0, 0)2
= 0
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 15 / 28
5⊕ 7 =
(1 + 4)⊕ (1 + 2 + 4)
= (1⊕ 1)⊕ (0⊕ 2)
⊕(4⊕ 4)
= 0⊕ 2⊕ 0 = 2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 16 / 28
5⊕ 7 = (1 + 4)⊕ (1 + 2 + 4)
= (1⊕ 1)⊕ (0⊕ 2)
⊕(4⊕ 4)
= 0⊕ 2⊕ 0 = 2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 16 / 28
5⊕ 7 = (1 + 4)⊕ (1 + 2 + 4)
=
(1⊕ 1)⊕ (0⊕ 2)
⊕(4⊕ 4)
= 0⊕ 2⊕ 0 = 2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 16 / 28
5⊕ 7 = (1 + 4)⊕ (1 + 2 + 4)
= (1⊕ 1)⊕ (0⊕ 2)
⊕(4⊕ 4)
= 0⊕ 2⊕ 0 = 2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 16 / 28
5⊕ 7 = (1 + 4)⊕ (1 + 2 + 4)
= (1⊕ 1)⊕ (0⊕ 2)
⊕(4⊕ 4)
=
0⊕ 2⊕ 0 = 2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 16 / 28
5⊕ 7 = (1 + 4)⊕ (1 + 2 + 4)
= (1⊕ 1)⊕ (0⊕ 2)
⊕(4⊕ 4)
= 0⊕ 2⊕ 0 = 2
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 16 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2
= 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5
= 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3
= 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2)
= 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0.
A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
For a Nim position (n1, . . . , nk) let:
V (n1, . . . , nk) = n1 ⊕ n2 ⊕ · · · ⊕ nk
Examples:
V (1, 1) = 1⊕ 1 = 0.
V (1, 2) = 1⊕ 2 = 3.
V (4, 5) = 4⊕ 5 = 1.
V (1, 2, 3) = 1⊕ 2⊕ 3 = 1⊕ 2⊕ (1 + 2) = 0.
Definition
A position is good if V 6= 0. A position is bad if V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 17 / 28
The Winning Nim Strategy
If V (n1, . . . , nk) = 0, and it is your turn, you will lose.
If V (n1, . . . , nk) 6= 0 then there is a move, ni n′i , so thatV (n1, . . . , n
′i , . . . , nk) = 0, and your opponent will lose.
That is: Bad positions lose. Good positions win.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 18 / 28
The Winning Nim Strategy
If V (n1, . . . , nk) = 0, and it is your turn, you will lose.
If V (n1, . . . , nk) 6= 0 then there is a move, ni n′i , so thatV (n1, . . . , n
′i , . . . , nk) = 0, and your opponent will lose.
That is: Bad positions lose. Good positions win.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 18 / 28
The Winning Nim Strategy
If V (n1, . . . , nk) = 0, and it is your turn, you will lose.
If V (n1, . . . , nk) 6= 0 then there is a move, ni n′i , so thatV (n1, . . . , n
′i , . . . , nk) = 0, and your opponent will lose.
That is: Bad positions lose. Good positions win.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 18 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ =
V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′
⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕
0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
=
V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕
(V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
=
(V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
=
(n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V .
Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni .
Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni .
V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
If V = 0, and there is a legal move, then any ni n′i will makeV ′ 6= 0.
If V 6= 0 then there is a legal move, ni n′i which will make V ′ = 0.
We write V = V (n1, . . . , nk) and V ′ = V (n1, . . . , n′i , . . . , nk).
We compute:
V ′ = V ′ ⊕ 0
= V ′ ⊕ (V ⊕ V )
= (V ′ ⊕ V )⊕ V
= (n′i ⊕ ni )⊕ V
We then get our two claims:
If V = 0 and ni 6= n′i then V ′ 6= 0.
If V 6= 0 then take ni to have the same largest digit as V . Letn′i = V ⊕ ni . Note: n′i ≤ ni . V ′ = ((V ⊕ ni )⊕ ni )⊕ V = 0.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 19 / 28
(1, 2)V=3
R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0
(Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 8
7 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 4
9 = 1 + 8⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
(1, 2)V=3R (1, 1)V=0
L (0, 1)V=1
R (0, 0)V=0 (Left loses.)
What about (15, 7, 9, 11) ?
15 = 1 + 2 + 4 + 87 = 1 + 2 + 49 = 1 + 8
⊕ 11 = 1 + 2 + 8
10 = 2 + 8
We must remove: 2 + 8 = 10 from either: 15, 10, 11.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 20 / 28
Winning Ways for Your Mathematical Plays
Winning Ways for Your Mathematical Plays byGuy, Conway, and Berlekamp. (Left to Right)
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 21 / 28
Peg solitaire and the Rubik’s Cube.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 22 / 28
Peg solitaire and the Rubik’s Cube.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 22 / 28
Sprouts and Hackenbush.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 23 / 28
Sprouts and Hackenbush.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 23 / 28
Dots and Boxes
Dots and Boxes by Berlekamp, and a tournament game.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 24 / 28
Your Move
Nim like games.
Chess problems.
Go problems.
Lateral thinking.
Tic-Tac-Toeproblems !
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 25 / 28
Your Move
Nim like games.
Chess problems.
Go problems.
Lateral thinking.
Tic-Tac-Toeproblems !
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 25 / 28
Your Move
Nim like games.
Chess problems.
Go problems.
Lateral thinking.
Tic-Tac-Toeproblems !
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 25 / 28
Your Move
Nim like games.
Chess problems.
Go problems.
Lateral thinking.
Tic-Tac-Toeproblems !
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 25 / 28
Your Move
Nim like games.
Chess problems.
Go problems.
Lateral thinking.
Tic-Tac-Toeproblems !
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 25 / 28
Your Move
Nim like games.
Chess problems.
Go problems.
Lateral thinking.
Tic-Tac-Toeproblems
!
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 25 / 28
Your Move
Nim like games.
Chess problems.
Go problems.
Lateral thinking.
Tic-Tac-Toeproblems !
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 25 / 28
The Golden Age of Board Games
Amazons, Catchup, Slither.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 26 / 28
References
Berlekamp, Elwyn R., John H. Conway, and Richard K. Guy
Winning Ways for Your Mathematical Plays, Volume 1-4.
AMC 10 (2004): 12.
Berlekamp, Elwyn R.
The Dots-and-Boxes Game: Sophisticated Child’s Play.
AK Peters, Ltd., 2000.
Silverman, David L.
Your Move: Logic, Math and Word Puzzles for Enthusiasts.
Dover Publications, 1991.
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 27 / 28
Thank you!
pgadey.wordpress.com
Parker Glynn-Adey (UoT) Math & Games March 23, 2014 28 / 28