Binary Games. Binary Guessing Game: a) Build a binary tetrahedron using the net on the next page and look out for patterns: i) on the vertices ii) on each edge iii) on the faces b) For each vertex, we write down all the numbers connected to that vertex by one segment. We obtain the sets A, B, C, D below. Describe a defining rule for each of these sets: A: ; ; ; 7; 9; ; ; B: ; ; 6; 7; 0; ; ; C: ; ; 6; 7; ; ; ; D: 8; 9; 0; ; ; ; ; If I pick a number between and and tell you exactly in which of the sets above it is, can you tell me the number and its binary form without looking at the tetrahedron? (you can try by looking first). Keep this tetrahedron handy, we will use it when we play the game of Nim. Note: the number in the interior of the tetrahedron could not be included on the D net.
Binary Tetrahedron Construction: Preparation: Using coloured pen, convert the numbers in this triangle into binary: Cut and glue the borders to get a D triangular pyramid (aka a tetrahedron) like the one in this diagram: Note: the number in the interior of the tetrahedron could not be included on the D net.
. Nim with piles Nim is a game of strategy. There are many variants but we will try this one: Start with any number of counters in any number of piles. Two s take turns to remove any number of counters from a single pile. The winner is the who takes the last counter. For each of the following starting position, decide who if both s play the best possible moves. Once you convince yourself that the loser couldn t have played any better, place a in the winner s column. a) Playing with two piles: Counters in each pile st nd,,,,, b) Playing with three piles: Counters in each pile st nd,,,,,,,,,, i) What are all the possible LOSE positions when playing with piles? ii) What are all the possible WIN positions when playing with piles? Describe a winning strategy. Starting with the smaller numbers and moving on to bigger ones, take any numbers on the binary tetrahedron. i) Who will win if the numbers are all on the same line? ii) Who will win if the numbers include vertices but are not all on the same line? iii) Find more starting positions which insure that the st loses. c) Playing with four piles: Counters in each pile st nd,,,,,, m,m,n,n Using the binary tetrahedron above, can you find more pile positions which insure that the st will lose? How about when the st? d) Look at all the positions discovered in the steps above in which the nd. Write the numbers of counters in each pile in a column and convert them to binary. Do you notice any patterns? Example:,,, 7 is one such position.
. Binary Guessing Game: a) Build a binary tetrahedron using the net on the next page and look out for patterns: i) on the vertices ii) on each edge iii) on the faces b) For each vertex, write down all the numbers connected to that vertex by segment. Describe a defining rule for each of these sets. Here they are in binary: A: ; ; ; 7; 9; ; ; B: ; ; 6; 7; 0; ; ; C: ; ; 6; 7; ; ; ; D: 8; 9; 0; ; ; ; ; If I pick a number between and and tell you exactly in which of the sets above it is, can you tell me the number and its binary form without looking at the tetrahedron? (you can try by looking first). Solution: a) i) Powers of. In binary: ii) The midpoint on each edges is the sum of the vertices of that edge. In binary, the midpoints are always written with two -s. iii) The centre of each face is the sum of the vertices of the faces. It is also the sum of the endpoints of the medians. The centres of faces are always the binary numbers written with three -s. The centre of the tetrahedron is written like In binary: A= the set of binary numbers ending in : _ B= the set of binary numbers with the -s digit equal to : _ C= the set of binary numbers with the -s digit equal to : _ D= the set of binary numbers with the 8-s digit equal to : _ Based on this, if you tell me in which sets the number is and in which it isn t, I can immediately write the number in binary by translating IT IS IN THE SET into and IT ISN T IN THE SET into 0 for the corresponding digit. For example, the number found in the sets A, B and D but not in C is. Nim with piles Nim is a game of strategy. There are many variants but we will try this one: Start with any number of counters in any number of piles. Two s take turns to remove any number of counters from a single pile. The winner is the who takes the last counter. We call a starting position of a game a WIN position if there is a strategy by which the first can win. We call it a LOSE position if there is a strategy for the second to win the game against the first. In each of the following starting position, decide whether it is a winning or a losing position:
a) Playing with two piles: Counters in each pile st nd,,,,, The positions in which the nd are those in which the two piles have the same numbers of counters, because whatever move the st makes with one pile, the nd can always mirror with the other pile. Example: Start st nd st nd st nd 0 0 0 nd Note: For these positions, the winner always has the same colour as the starting position. Thus colour-coding the s is a very handy way to keep track of who will win. If you start with any other position you can always take away the extra counters from the larger pile, thus making the piles even. Example: Start st st First has brought the game to a position which is a win for the current nd, but after the first move, the st has become nd, so he/she WINS. b) Playing with three piles: Counters in each pile,,,,,,,,,, st nd Starting with the smaller numbers and moving on to bigger ones, take any numbers on the binary tetrahedron. i) Who will win if the numbers are all on the same line? ii) Who will win if the numbers include vertices but are not all on the same line? iii) Find more starting positions which insure that the st loses. The first two positions in the table are WINs because the st can leave the nd with piles of equal numbers of counters: Start st st
Start st st Note that in these cases, the winner is coloured differently from the starting position. The starting position,, leads the nd winning the game. To prove this, we have to show that all possible moves of the st lead him to a position where the other : Start st nd nd nd nd nd nd Position,, leads to the st winning because it can be sent to,, in one move. Start st st
Position,, is a LOSE because whatever the st move, the nd move can send the game to one of these LOSE positions:,, (or a permutation) or,, or,. Start st nd or or or or or nd nd nd nd nd A shorter way to show how each game depends on the outcomes of the previous ones is to represent the possible moves as arrows in a table. A if there is an arrow starting from his/her initial position to a WIN position. A loses if all the arrows which can be drawn from its position end up in an empty slot. Counters in each pile st s turn nd s turn WIN with WIN,, or permutations WIN,, or permutations WIN,, or permutations WIN,, or permutations WIN,, or permutations i) If the numbers are all on the same line in the tetrahedron, then the nd. Indeed, starting with numbers on the same line and changing one of them with a smaller number, this smaller number, together with one of the other initial numbers, form a new line in the tetrahedron. Now the remaining of the initial numbers can be swapped with a number on the new line, which is always smaller than the original one. Indeed, this can be checked algebraically because any collinear numbers
satisfy (possibly after reordering): If the st move is and then so the next move can be Now are all on the same line, but are smaller than the starting numbers. We can continue this way till reaching,, which is a LOSE for the st. If the st move is and then so the next move can be ii) If the numbers include vertices but are not all on the same line, then they form a WIN position. Indeed this move can be reduced in move to a position where the numbers are all on the same line. Algebraically, if with satisfy then take and if then take. In fact all other points not on a line can boast the same property except some triples of midpoints. iii) Can you find other LOSING positions? There are some triplets of midpoints which also form LOSE positions. That is because these triplets also satisfy as if they were collinear. You can check on the tetrahedron that the only moves available lead to WIN positions above. (Note to tutors: the binary tetrahedron is in fact secretly the dimensional projective spaces with coordinates in, known as the Fano projective space. In this space, all midpoints of edges form a plane and the triplets of midpoints mentioned above are collinear, indeed.) c) Playing with four piles: c) Playing with four piles: Counters in each pile st nd,,,,,, m,m,n,n Using the binary tetrahedron above, can you find more pile positions which insure that the st will lose? How about when the st? WIN positions: m,m,n,p with p different from n. LOSE positions:,,, 7 and similar positions in the tetrahedron. In moves these can be reduced either to m,m,n,n or to a LOSE position with points on a line like in b). No exhaustive proof should be required during classtime. d) Look at all the positions discovered in the steps above in which the nd. Write the numbers of counters in each pile in a column and convert them to binary. Do you notice any patterns? Examples: v They all have even numbers of -s on each column. In fact, this is always true: the nd always when there are an even numbers of s in each column of the binary codes for the starting position, because: - the st s move will always disturb this property, - but this property can then always be restored in one move.
s in columns: s in columns: s in columns: 0 s in columns: s in columns: 0 Whenever the st moves, the digits in one of the rows are changed. In particular, there is a leftmost changed into a 0. We call that a pivot, and colour it and the following digits in blue. Because the number of s in each column is originally even, the pivot is paired with another from the same column but different row. When the pivot is changes into a 0 by the st, the number of s on the pivot s column becomes odd, (and the same may happen to some of the following columns). To rectify this, the second changes the pivot s paired, and possibly the following digits.