Game, Set, and Match Carl W. Lee September 2016

Similar documents
Game, Set, and Match Carl W. Lee September 2016

Figure 1: The Game of Fifteen

Contents. MA 327/ECO 327 Introduction to Game Theory Fall 2017 Notes. 1 Wednesday, August Friday, August Monday, August 28 6

Game, Set, and Match A Personal Journey

Senior Math Circles February 10, 2010 Game Theory II

Grade 6 Math Circles Combinatorial Games - Solutions November 3/4, 2015

Week 1. 1 What Is Combinatorics?

Tutorial 1. (ii) There are finite many possible positions. (iii) The players take turns to make moves.

Grade 7 & 8 Math Circles. Mathematical Games

Grade 6 Math Circles Combinatorial Games November 3/4, 2015

Impartial Combinatorial Games Berkeley Math Circle Intermediate II Ted Alper Evans Hall, room 740 Sept 1, 2015

The first player, Fred, turns on the calculator, presses a digit key and then presses the

The Mathematics of Playing Tic Tac Toe

the alien has the option of asserting that all 100 aliens have been to the living room by now. If this assertion is false, all 100 aliens are thrown

OCTAGON 5 IN 1 GAME SET

2. The Extensive Form of a Game

EXPLORING TIC-TAC-TOE VARIANTS

Sequential games. We may play the dating game as a sequential game. In this case, one player, say Connie, makes a choice before the other.

Math 152: Applicable Mathematics and Computing

Figure 1: A Checker-Stacks Position

Crossing Game Strategies

Game Theory and Algorithms Lecture 19: Nim & Impartial Combinatorial Games

Grade 7/8 Math Circles Game Theory October 27/28, 2015

Plan. Related courses. A Take-Away Game. Mathematical Games , (21-801) - Mathematical Games Look for it in Spring 11

Dominant and Dominated Strategies

JUSTIN. 2. Go play the following game with Justin. This is a two player game with piles of coins. On her turn, a player does one of the following:

Games of Skill Lesson 1 of 9, work in pairs

Obliged Sums of Games

Games of Skill ANSWERS Lesson 1 of 9, work in pairs

Analyzing Games: Solutions

Mathematical Magic for Muggles April 16, 2013

Circular Nim Games. S. Heubach 1 M. Dufour 2. May 7, 2010 Math Colloquium, Cal Poly San Luis Obispo

Game Tree Search. CSC384: Introduction to Artificial Intelligence. Generalizing Search Problem. General Games. What makes something a game?

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.)

Numan Sheikh FC College Lahore

Subtraction games with expandable subtraction sets

Mind Ninja The Game of Boundless Forms

Dominant and Dominated Strategies

CHECKMATE! A Brief Introduction to Game Theory. Dan Garcia UC Berkeley. The World. Kasparov

STAJSIC, DAVORIN, M.A. Combinatorial Game Theory (2010) Directed by Dr. Clifford Smyth. pp.40

Legend. The Red Goal. The. Blue. Goal

I.M.O. Winter Training Camp 2008: Invariants and Monovariants

Exploring Concepts with Cubes. A resource book

Three Pile Nim with Move Blocking. Arthur Holshouser. Harold Reiter.

Tangent: Boromean Rings. The Beer Can Game. Plan. A Take-Away Game. Mathematical Games I. Introduction to Impartial Combinatorial Games

DELUXE 3 IN 1 GAME SET

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

CPSC 217 Assignment 3 Due Date: Friday March 30, 2018 at 11:59pm

PRIMES STEP Plays Games

Section Summary. Finite Probability Probabilities of Complements and Unions of Events Probabilistic Reasoning

Formidable Fourteen Puzzle = 6. Boxing Match Example. Part II - Sums of Games. Sums of Games. Example Contd. Mathematical Games II Sums of Games

Game Theory Lecturer: Ji Liu Thanks for Jerry Zhu's slides

Problem F. Chessboard Coloring

Roll & Make. Represent It a Different Way. Show Your Number as a Number Bond. Show Your Number on a Number Line. Show Your Number as a Strip Diagram

arxiv:cs/ v2 [cs.cc] 27 Jul 2001

Contest 1. October 20, 2009

LEARNING ABOUT MATH FOR GR 1 TO 2. Conestoga Public School OCTOBER 13, presented by Kathy Kubota-Zarivnij

Game Simulation and Analysis

Two Great Escapes. Jerry Lo, Grade 8 student, Affiliated High School of the Taiwan National Normal University. The Great Amoeba Escape

Gough, John , Doing it with dominoes, Australian primary mathematics classroom, vol. 7, no. 3, pp

PARITY, SYMMETRY, AND FUN PROBLEMS 1. April 16, 2017

New Values for Top Entails

Games, Triangulations, Theory

Ian Stewart. 8 Whitefield Close Westwood Heath Coventry CV4 8GY UK

Sept. 26, 2012

Combined Games. Block, Alexander Huang, Boao. icamp Summer Research Program University of California, Irvine Irvine, CA

Wordy Problems for MathyTeachers

Jamie Mulholland, Simon Fraser University

5 Games For Building Logic

MATH GAMES THAT SUPPORT SINGAPORE MATH GRADES

3. If you can t make the sum with your cards, you must draw one card. 4. Players take turns rolling and discarding cards.

Nontraditional Positional Games: New methods and boards for playing Tic-Tac-Toe

A few chessboards pieces: 2 for each student, to play the role of knights.

What is... Game Theory? By Megan Fava

Narrow misère Dots-and-Boxes

Counters in a Cup In and Out. The student sets up the cup, drops the counters on it, and records how many landed in and out of the cup.

Games for Drill and Practice

Solutions to Part I of Game Theory

Hackenbush. Nim with Lines (and something else) Rules: Example Boards:

A Combinatorial Game Mathematical Strategy Planning Procedure for a Class of Chess Endgames

Advanced Microeconomics: Game Theory

Background. Game Theory and Nim. The Game of Nim. Game is Finite 1/27/2011

The Game of SET R, and its Mathematics.

PUTNAM PROBLEMS FINITE MATHEMATICS, COMBINATORICS

arxiv: v1 [math.co] 30 Jul 2015

Surreal Numbers and Games. February 2010

Instruction Cards Sample

An Optimal Algorithm for a Strategy Game

Wythoff s Game. Kimberly Hirschfeld-Cotton Oshkosh, Nebraska

DIVISION III (Grades 4-5) Common Rules

Making Middle School Math Come Alive with Games and Activities

The Game of SET R, and its Mathematics.

Moneybags. by Will Chavis. Combinatorial Games. Instructor: Dr. Harold Reiter

COUNTING AND PROBABILITY

Selected Game Examples

2. Nine points are distributed around a circle in such a way that when all ( )

To Your Hearts Content

Tilings with T and Skew Tetrominoes

High-Impact Games and Meaningful Mathematical Dialog Grades 3-5

The game of Paco Ŝako

Transcription:

Game, Set, and Match Carl W. Lee September 2016 Note: Some of the text below comes from Martin Gardner s articles in Scientific American and some from Mathematical Circles by Fomin, Genkin, and Itenberg. 1

1 Fifteen This is a two player game. Take a set of nine cards, numbered one (ace) through nine. They are spread out on the table, face up. Players alternately select a card to add their hands, which they keep face up in front of them. The goal is to achieve a subset of three cards in your hand so that the values of these three cards sum to exactly fifteen. (The ace counts as 1.) This is an example of a game that is isomorphic to (the same as ) a well-known game: Tic-Tac-Toe. Number the cells of a tic-tac-toe board with the integers from 1 to 9 arranged in the form of a magic square. 8 1 6 3 5 7 4 9 2 Then winning combinations correspond exactly to triples of numbers that sum to 15. This is a combinatorial two person game (but one that permits ties). There is no hidden information (e.g., cards that one player has that the other cannot see) and no random elements (e.g., rolling of dice). 2

2 Ones and Twos Ten 1 s and ten 2 s are written on a blackboard. In one turn, a player may erase (or cross out) any two numbers. If the two numbers erased are identical, they are replaced with a single 2. If they are different, they are replaced with a 1. The first player wins if a 1 is left at the end, and the second player wins if a 2 is left. This is not much of a real game, because no matter what moves anyone makes, the second player will win. Because there are fewer numbers on the board after each move, the game must inevitably end with a single number. The sum of the initial set of numbers is even, and every move preserves parity, so the sum remains even throughout. Thus the game must end with a single 2. This is a combinatorial two person game that cannot end in a tie. It is impartial because the options for moves are the same for each player. 3

3 100 This is a two player game. Begin with the number zero. Players alternately add a positive whole number from 1 to 6, inclusive, to the current running sum. The first player to exactly achieve the number 100 wins. This is a two person impartial combinatorial game. This game illustrates the principle of winning positions. These are positions that are desirable to achieve upon the completion of your move. A position is winning for player A if every move by player B from that position leads to a losing position for B, and a position is losing for A if there exists a move by B from that position that leads to a winning position for B. There is a theorem that if a two person game with no hidden information or random elements is finite (definitely ends) and cannot end in a tie, then either the first player or the second player must have a winning strategy. This strategy amounts to always moving to a winning position. In practice it may be very difficult to analyze the game to determine the winning positions, but in this game it is not the winning positions are those that (like the number 100) are multiples of 7 plus 2. Some games, like this one, can be analyzed by working backwards from the ending position. Note that tic-tac-toe can end in a tie, so the above theorem does not apply to tic-tac-toe. However, that does not mean that there aren t good strategies for playing tic-tac-toe well. 4

4 Two Pile Nim This two person game is played with two piles of 10 coins each. On your move you select one of the piles and take away a positive number of coins from that pile. The winner is the player who takes the very last coin from the table. This is another two person impartial combinatorial game. This game illustrates the principle of symmetry. By copying the first player s moves, the second player can win. The winning positions are those in which both piles have equal numbers of coins. Another game that can be approached by the principle of symmetry: A daisy has 12 petals (or 11 petals). Players take turns tearing off either a single petal, or two petals right next to each other. The player who cannot do so loses. 5

5 Simultaneous Chess This is really more of a puzzle. How can you play two games of chess simultaneously against two different opponents, and guarantee either winning at least one or else tying both? Play different colors in the two games, and copy moves of your opponent from one game when you make moves in the other game. Thus, you are really pitting your opponents against each other. 6

6 Two Pile Nim II This two person game is played with two piles of 10 coins each. On your move you may either take exactly one coin from one of the piles, or you may take exactly one coin from each of the piles. The winner is the player who takes the very last coin from the table. Work backwards from the final winning position (0, 0) to determine other winning positions. Then prove that a position (a, b) is winning if and only if both a and b are even. 7

7 Queen Place a queen on the bottom row, third cell from the left (c1) of an 8 8 chessboard. Players alternate by moving the queen a positive amount right, upward, or diagonally right and upwards. To win you must move the queen to the upper right cell (h8). Work backwards to determine the winning positions. 8

8 Three Pile Nim This time the game begins with three piles of coins, of sizes 3, 5, and 7. Two players alternately select a pile and remove a positive number of coins from the chosen pile. The player to remove the very last coin wins. Winning positions here are not so obvious, but can be determined by working backwards. It can be proved that winning positions (a, b, c) are those in which the nim-sum of the numbers a b c is 0. The nim-sum of numbers is computed as follows: Write the numbers in binary (base 2), add these representations with no carrying, mod 2 (even numbers become 0 and odd numbers become 1), and then convert the result back to base 10. In this way you can assign a nim-value to every position, and win by always achieving positions of nim-value 0. Example: Position (3, 5, 6) is a winning position. 4 2 1 3 = 0 1 1 5 = 1 0 1 6 = 1 1 0 2 2 2 0 0 0 = 0 9

9 Kayles Begin with a row of 10 touching coins. Think of these as bowling pins. Players alternately remove either a single coin, or two touching coins. The first player to take the very last coin wins. This game (and some others we have already seen) are impartial games, meaning that the set of moves available to each player from a given position is the same. (So tic-tac-toe is not an impartial game.) There is a theorem that nim-values can be assigned to the positions of every finite impartial game in the following way: Final winning positions are assigned the value 0. The value of any other position is the smallest nonnegative integer not occurring as a value of any immediately subsequent position. This is known as the mex rule the minimum excluded value. There is another theorem that if a finite impartial game is the sum of k other finite impartial games meaning that on your turn you are to select exactly one of the k games and make a valid move in that game then the nim-value of the game is the nim-sum of the nim-values of the k games. Using these results it is possible to determine the nim-value f(n) of a row of n coins in Kayles, but it is a bit of a challenge to come up with a general formula. On the other hand, if you are not interested in nim-values, but only a winning strategy, the first player can always win Kayles by exploiting symmetry. In general it may not be easy to determine the nim-values for positions in more complicated impartial games, and there many games for which the nim-values have not been successfully fully analyzed. 10

10 Hex Hex is played on a diamond-shaped board made up of hexagons (see Figure 1). The number BLACK WHITE WHITE BLACK Figure 1: The Game of Hex of hexagons may vary, but the board usually has 11 on each edge. Two opposite sides of the diamond are labeled black ; the other two sides are white. The hexagons at the corners of the diamond belong to either side. One player has a supply of black pieces; the other, a supply of white pieces. The player alternately place one of their pieces on any one of the hexagons, provided the cell is not already occupied by another piece. The objective of black is to complete an unbroken chain of black pieces between the two sides labeled black. White tries to complete a similar chain of white pieces between the sides labeled white. See Figure 2 for an example of a path. There will almost certainly be pieces not on the winning path, and there is no obligation to construct the path in any particular order. 11

All that is necessary to win is to have a path joining your two sides of the board somewhere among all the pieces you have played. BLACK WHITE 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 WHITE BLACK Figure 2: An Example of a Path in Hex 12

This is a good game to illustrate the existence of a winning strategy. First prove that the game cannot tie (you may find this surprising!). Of course, it must come to an end. Therefore either the first player or the second player has a winning strategy. You can prove by contradiction that the first player has a winning strategy. Assume the second player has a winning strategy. Then the first player can play at an arbitrary location (which can only help, not hurt) and then pretend to be the second player, using the second player s winning strategy. (If at any point the winning strategy indicates he should play at the location of the initial arbitrary move, then he makes another arbitrary move instead.) In this way the first player wins, which is a contradiction. Therefore the first player must have a winning strategy. However, there is no known description of this winning strategy! We know it exists, but we don t know what it is! There are some apps for playing Hex, such as http: // www. telacommunications. com/ misc/ games/ hex/ board11. html. 13

11 Hex II Hex II is played on the board shown in Figure 3. Its rules are the same as Hex. Black is to play first. WHITE BLACK BLACK Figure 3: The Game of Hex II WHITE This game is a trick because the dimensions of the board are not equal. There is a pairing strategy so that if the player with the shorter span to cross (in this case White) moves second, he/she can always win. See Martin Gardner s article on Hex, reprinted from Scientific American in The Scientific American Book of Mathematical Puzzles and Diversions. 14

12 Gale A Gale board is shown in Figure 4. (Imagine that the hollow circles are actually red.) If it Figure 4: The Game of Gale is played on paper, one player uses a black pencil for drawing a straight line to connect any pair of adjacent black dots, horizontally or vertically but not diagonally. the other player uses a red pencil for similarly joining pairs of red dots. Players take turns drawing lines. No line can cross another. The winner is the first player to form a connected path joining the two opposite sides of the board that are his color. Figure 5 shows the result of a game in which red has won. 15

Figure 5: A Gale Game in which Red has Won 16

The same method of proof as for Hex shows that there is a winning strategy for the first player. Unlike Hex, an explicit winning strategy is known. Martin Gardner describes a winning pairing strategy for the first player in his article Bridg-It and Other Games published in Martin Gardner s New Mathematical Diversions from Scientific American. There are some apps for playing Gale such as https: // itunes. apple. com/ us/ app/ the-game-of-gale/ id520227043? mt= 8. 17

13 Relatives of Tic-Tac-Toe 13.1 Three-Dimensional Tic-Tac-Toe This is familiar to most people. It is played on a 3 3 3 board with the object of getting three in a row, or on a 4 4 4 board with the object of getting four in a row. What is the optimal strategy? It is known that the first player can always win 3 3 3 and 4 4 4 tic-tac-toe. 13.2 Wild Tic-Tac-Toe This is the same as tic-tac-toe, except that on your turn you may place either an X or an O your choice in an empty cell. If this results in three-in-a-row with either symbol, then you win. Try this also with a 3 3 3 board. 13.3 Toe-Tac-Tic This is the same as tic-tac-toe, except that the first player to get three in a row loses. Try this also with a 3 3 3 board. 13.4 Wild Toe-Tac-Tic This is the same as wild tic-tac-toe, except that the first player to get three in a row loses. Try this also with a 3 3 3 board. 18

13.5 Four-Dimensional Tic-Tac-Toe Four-dimensional tic-tac-toe can be played on an imaginary hypercube by sectioning it into two-dimensional squares. A 4 4 4 4 hypercube, for example, would be diagrammed as shown in Figure 6. Figure 6: Four-Dimensional Tic-Tac-Toe On this board a win of four in a row is achieved if four marks are in a straight line on any cube that can be formed by assembling four squares in serial order along any orthogonal or either of the two main diagonals. Figure 7 shows five examples of winning configurations. For example, if you occupy the four cells labeled 2, you win. You can extend constructions of this type to play tic-tac-toe of any dimension! 19

2 1 3 3 3 4 3 1 2 4 5 5 5 5 1 2 4 1 4 2 Figure 7: Four-Dimensional Tic-Tac-Toe 20

14 Thinking about Thinking This is more of a puzzle than a game, but you might try this first with different combinations of hats for the three people. Three students Alfred, Beth, and Carla are blindfolded and told that either a red or a green hat will be placed on each of them. After this is done, the blindfolds are removed; the students are asked to raise a hand if they see a red hat, and to leave the room as soon as they are sure of the color of their own hat. All three hats happen to be red, so all three students raise a hand. Several minutes go by until Carla, who is more astute than the others, leaves the room. How did she deduce the color of her hat? Pretend you are Carla and reason out what would happen (what Alfred and Beth would do) if you are wearing a green hat. 21

15 More Thinking about Thinking Two students, A and B, are chosen from a math class of highly logical individuals. They are each given one positive integer. Each knows his/her own number, and is trying to determine the other s number. They are informed that their numbers are consecutive. In each of the following scenarios, what can you deduce about the two numbers? 1. First Scenario A: I know your number. B: I know your number. 2. Second Scenario A: I don t know your number. B: I know your number. A: I know your number. 3. Third Scenario A: I don t know your number. B: I don t know your number. A: I know your number. B: I know your number. 4. Fourth Scenario A: I don t know your number. B: I don t know your number. A: I don t know your number. B: I don t know your number. A: I know your number. B: I know your number. 22

16 Morra This game is played by two players, R and C. Each player hides either one or two silver dollars in his/her hand. Simultaneously, each player guesses how many coins the other player is holding. If R guesses correctly and C does not, then C pays R an amount of money equal to the total number of dollars concealed by both players. If C guesses correctly and R does not, then R pays C an amount of money equal to the total number of dollars concealed by both players. If both players guess correctly or incorrectly, no money exchanges hands. This is a classic example of a two-person zero-sum game one player gains what the other player loses. The game can be represented by a matrix, in which the rows are labeled by the options for player R, the columns are labeled by the options for player C, and the entries correspond to the amount paid by C to R for those particular options (which is negative if C wins). Hold 1, Guess 1 Hold 1, Guess 2 Hold 2, Guess 1 Hold 2, Guess 2 Hold 1, Guess 1 0 2 3 0 Hold 1, Guess 2 2 0 0 3 Hold 2, Guess 1 3 0 0 4 Hold 2, Guess 2 0 3 4 0 There is a theorem that every such game has an optimal mixed strategy for each player to maximize the expected gain by R and to minimize the expected loss for C. In the case of Morra, there is an optimal mixed strategy that, if both players use, keeps the game even. Each player should hold one, guess two 3/5 of the time, and hold two, guess one 2/5 of the time. Perhaps surprisingly, it turns out that if R announces his guess before C, then C can alter her strategy to tip the game a little bit in her favor. For a complete analysis, see Chvátal s book on Linear Programming, Chapter 15. 23

17 The Prisoner s Dilemma From the Wikipedia article of this name (accessed 9/15/16): Two members of a criminal gang are arrested and imprisoned. Each prisoner is in solitary confinement with no means of communicating with the other. The prosecutors lack sufficient evidence to convict the pair on the principal charge. They hope to get both sentenced to a year in prison on a lesser charge. Simultaneously, the prosecutors offer each prisoner a bargain. Each prisoner is given the opportunity either to: betray the other by testifying that the other committed the crime, or to cooperate with the other by remaining silent. The offer is: If A and B each betray the other, each of them serves 2 years in prison If A betrays B but B remains silent, A will be set free and B will serve 3 years in prison (and vice versa) If A and B both remain silent, both of them will only serve 1 year in prison (on the lesser charge). See also https://www.youtube.com/watch?v=_1sextvsxjk This is a classic example of a two-person non-zero-sum game. You can find numerous articles and apps. 24

18 Set This commercial game consists of a deck of 81 cards. Each card is made from one of three symbols, in one of three quantities, in one of three colors, and one of three shadings. Thus there are four attributes, and each card can be represented by an ordered 4-tuple (a, b, c, d), where each of a, b, c, d equals 1, 2, or 3. A set is a collection of three cards such that for each attribute they completely agree or completely disagree. Thus (2, 3, 1, 1), (2, 1, 1, 3), and (2, 2, 1, 2) constitute a set. An array of 12 cards is dealt, and players try to find sets. If a player detects a set, then he/she calls set and claims it, these three cards are given to the player, and three more cards are dealt into the vacant spots. If there are no sets, then three more cards are dealt to increase the size of the array. There is a penalty, say, of one set, if a player incorrectly calls set without identifying one. When the deck is exhausted, the player with the most sets is the winner. There is an official ipad app for this game that permits play for up to four players here: https://itunes.apple.com/us/app/set-pro-hd/id381004916?mt=8. It is very interesting to see how some fast some players can spot sets. Note that every choice of two cards can be uniquely completed to a set. What is the maximum number of cards possible that is set-free? I have read that it is 20. 25

19 Sprouts The game of Sprouts begins with n spots on a sheet of paper. Even with as few as three spots, Sprouts is more difficult to analyze than tic-tac-toe, so that it is best for beginners to play with no more than three or four initial spots. A move consists of drawing a curve that joins one spot to another or to itself and then placing a new spot anywhere along the curve. These restrictions must be observed: 1. The curve may have any shape but it must not cross itself, cross a previously drawn curve or pass through a previously made spot. 2. No spot may have more than three curves emanating from it. Players take turns drawing curves. In normal sprouts, the recommended form of play, the winner is the last person able to play. This is a simple combinatorial game with unknown winning strategy (I believe). 26

20 Checkers, Chess, and Go There has been tremendous progress in recent years on developing computer algorithms to play these games. Checkers has been completely solved in the sense that there are unbeatable computer programs that show that under best play the game ends in a draw. See http://www. scientificamerican.com/article/computers-solve-checkers-its-a-draw. On computer chess: https://en.wikipedia.org/wiki/computer_chess. On computer go: https://en.wikipedia.org/wiki/computer_go. 27

21 Other Topics Kuhn s Poker Checker Stacks Cooperative games and associated values Kruskal Count trick The Monty Hall problem Optimal gas station selection Towers of Hanoi The Chinese rings puzzle The Perfect Shuffle Theorem Risk and dynamic programming The Gambler s Ruin Minecraft Games for research 28

22 Further Reading For discussion and analyses of many, many games, see Winning Ways for your Mathematical Plays, by Berlekamp, Conway, and Guy. 29