Describe All Losing Cells

Print   

02 Nov 2017

Disclaimer:
This essay has been written and submitted by students and is not an example of our work. Please click this link to view samples of our professional work witten by our professional essay writers. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of EssayCompany.

We are given a certain structure - piles of stones, candies,numbers, playing cards, table etc. Two players in turn change the structure using only a number of allowed operations. Each of them is trying to reach a certain winning position. The problem is to find (if it exists) a winning strategy for one of the players.

One basic and powerful toll for solving such problems is to consider small values of some of the given entries.this gives a reasonable amount of information to make correct conclusions and good insights about the problem.

Example 1.

Two piles having m and n cards are given. Two plyers play the following game. Each of them in turn is allowed to perform one of the following moves:

1.remove one card from a pile of this choice;

2.remove one card from each of the two piles;

3.shift a card from one pile to the other.

A player who has no move loses the game. Determine in terms of m and n who has a winning strategy.

Solution 1.

We begin by inspection for small values of m and n. To do so consider a 11X11 table and label the rows and the columns of the table consecutively by the numbers 0,1,2,...10,starting from the bottom row and the left most column (Diagram 1).

In this notation,(0,0) is the left cell in the bottom of the table. The cells(5,2)and (3,3) are marked.

Choose one of the given piles to be the first, then the other pile is the second. Suppose that at a certain moment there are x cards in the first pile and y cards in the second pile. We will denote the situation of the game at this moment by the pair (x,y) of the numbers of cards in the piles; and, for a better visual representation, we associate with it the respective cell (x,y) to one of the five cells (x-1,y),(x,y-1),(x-1,y-1),(x-1,y+1),(x+1,y-1) (see Digram 2), but only if x and y are different from 0.

(x-1, y+1)

(x-1, y)

(x, y)

(x -1, y - 1 )

(x,y -1 )

(x+1, y)

In the case when x=0 and y is different than 0 there are two possible moves - to (0,y -1) and (1,y - 1 ); in the case when y = 0 and x is different than 0 there are also two possible moves, and in the case when x = y = 0 no move is possible.

The last observation gives us a key to the solution of the problem, because the player, who has the move when the game is in the position(0,0), loses. We label the cell(0,0)by L, indicating, that it is "losing" for the player who has the move when the game is at that point. Now we can label the neighboring three cells by W as "winning"(see Diagram 3), because the player, who has the move when the situation in the game is represented by on for there cells, clearly has a winning strategy : he can transform the game to cell (0,0), which is losing for his opponent.

Diagram 3 Diagram 4

But then clearly the cells (0,2) and (2,0) are losing (Diagram 4) for the player who has the move, since all possible moves form there cells lead to cells labeled W, i.e. To positions which are winning for the opponent.

Diagram 5

As it was explained above, each of the last two "losing "cells has three "winning" neighbours (Diagram 5). Continuing this construction, we see, that the "L-cells: and the "W-cells " form a specific pattern. This pattern can be described also in the following way: all cells of the form (2p,2q), where p and q are non-negative integers, are "losing", and all remaining cells are "winning" (Diagram 6).

Or, in other words, the second player wins if and only if both numbers m and n are even. We will prove that this assertion is true.

Suppose m and n are even numbers, i.e. m=2m0 and n+2n0. With respect to the move of the first player and up to equivalence the following distributions may occur:

(a) m+2m0 -1 and n = 2n0 cards. The second player takes a card from the first pile and it remains m = 2m0 - 2 and n = 2no cards respectively.

(b) m = 2m0 -1 and n = 2n0 - 1 cards. The second player takes one card from the two piles and it remains m = 2m0 - 2 and n = 2n0 - 2 cards.

(c) m = 2m0 -1 and n = 2n0 + 1 cards. The second player take s one card from the two piles and it remains m = 2m0 - 2 and n = 2n0 cards.

By the above strategy after two moves, one by each player, the number of cards decreases and the second player always has move. It follows that the first player loses.

Assume m and n are not both even. With his first move the first player makes both m and n even and then follows the above strategy.

Examples 2.

Consider a 2 x 2011 tables. Two players in turn place dominoes on it, the first one places only horizontal dominoes and the second one places only vertical dominoes. The dominoes may not overlap. The player who has no legal move loses the game.

Solution 2.

Denote the player who places horizontal dominoes by A and the player who places vertical ones by B. We prove that A has a winning strategy. We show first that if it is player B’s move on an empty 2 x 4 table then he loses the game. Indeed, observe that no matter where B places his vertical domino then A always has a move. It is easy to see now that irrelevant to the move of A, B has a unique move after which A also has a move. Now the table is covered and player A wins.

Consider now a 2X2011 table. Let A split the table into 502 tables 2X4 and one table 2X3. His first move is to put a domino anywhere in the 2 x 3 table. Note that the vertical dominoes of B lie entirely inside one of the small tables.

Player A now follows the strategy:

Each time B puts a domino in one of the 2 X 4 tables then A places a domino in the 2x 4 tables. According to the above observation this is always possible.

If B puts his vertical domino in the 2 x 3 table then A puts another horizontal domino in this table. Thus the 2X3 table is completely covered and no there moves in this table are possible.

The described strategy shows that no matter what moves B marks, A always has a move. Thus the last move will belong to A.

There fore the first player has a winning strategy.

Example 3.

Two piles of a and b stones are given. Tow players in turn take a certain number of stones from one pile and move the same number of stones from this pile to the other one. A player who can not play according to that rule loses. Determine in terms of a and b who has a winning strategy.

Solution 3.

We present two solutions. The first one is based on our main approach, that is, to consider particular values of a and b and draw conclusions for the general case.

Alternative 1.

Without loss of generality assume that b a. Denote the pile with a stones by A and that with B stones by B. If at a certain moment there are X stones in A and y stone in B, we will say that the game is in position (x,y), or simply in (x,y). This terminology and notation help to make a suitable visual representation of the rules of the game and the moves of the players. The diagram shows a Cartesian system of coordinates and points with integer coordinates in it. We will assume that the point P =(12,7) represents the position (12,7). From this position, the following moves are possible (for the player who has the move):

1) take 1 stones form A and move 1 stone form A to B: the game passes to position A1 (10,8) with 10 stones in A and 8 stones in B.

2) take 2 stones form A and move 2 stone form A to B: the game passes to position A2 (8,9) with 8 stones in A and 9 stones in B.

3) take 3 stones form A and move 3 stone form A to B: the game passes to position A3 (6,10) with 6 stones in A and 10 stones in B.

4) take 4 stones form A and move 4 stone form A to B: the game passes to position A4 (4,11) with 4 stones in A and 11 stones in B.

5) take 5 stones form A and move 6 stone form A to B: the game passes to position A5 (2,12) with 2 stones in A and 12 stones in B.

6) take 6 stones form A and move 6stone form A to B: the game passes to position A6 (0,13) with 0 stones in A and 13 stones in B.

7) take 1 stone form A and move 1 stone form A to B: the game passes to position B1 (13,5) with 13 stones in A and 5 stones in B.

8) take 2 stone form A and move 2 stone form A to B: the game passes to position B2 (14,3) with 14 stones in A and 3 stones in B.

9) take 3 stone form A and move 3 stone form A to B: the game passes to position B3 (15,1) with 15 stones in A and 1 stones in B.

In the other words, the player, who has the move ,can transform the game from position/ point P to one of the positions/points A1, A2, A3, A4, A5, A6,B1,B2,B3. Of there points the first 6 lie on the line.

Y= -1/2.(x-12)+7,

And their abscissas and ordinates are in the interval [0,10] and [8,13], respectively; the last 3 lie on the line

Y= -2 ( x -12 +7),

and their abscissas and ordinates are in the intervals [13,16] and [0,5], respectively.

Note also that the abscissas of any two consecutive points from A1, A2, A3, A4, A5, A6 differ by 2 whereas their ordinates differ by 1. For B1,B2,B3 the abscissas of any two consecutive points differ by a and the ordinates differ by2.

Summarizing the above observations we come to the following conclusion. From a position pint P we "move" along one of the two semi-lines passing through P and having slopes -2 and - 1/2 respectively. Moreover we may reach any point with non-negative coordinates on there two lines.

(i) a = 0, b = 1, i.e. If the game is in position (0,1);

(ii) a = 1, b = 0, i.e. If the game is in position (1,0);

(iii) a = 1, b = 1, i.e.if the game is in position(1,1);

Then the first player has no move and he loses.

There three positions determine a "losing set" L , consisting of the positions on the three lines with equations y = x+1, passing through (0,1); y = x, passing through (1,1); and y= x -1, passing through (1,0).

We will show that if a player has the move when the game is in one of the positions of this losing set, then the other player has a winning strategy. This strategy is based on two observations:

if the game is in a position of L , then any possible move leads to position outside L.

B) if the game is in a position outside L, then there exists a possible move that leads to position of L.

The two observation follow from the fact that any line of slope -2 or - 1/2 intersects the set L , in exactly one point.

It remains to note that the number of stones decreases and eventually we will reach one fo the losing positions (0,1), (1,0) or (1,1).

Alternative 2

Without loss of generality assume that b ≥ a. We prove that the second player wins if and only if

b - a ≤ 1.

Indeed, suppose b = 1+i where i = 0 or i = 1. If a = 0 or a = 1 then the first player has no move and he loses, so let a>1. Assume the first player takes x > 0 stones from one of the piles and moves the same number of x stones to the other one. The stones then become a - 2x and a+ i+ x or a + i - 2x. In the first case since a ≥ 2x we have a+i+x ≥ 2x and the second player makes the same move suing the other pile and he gets piles with a -x and a + i -x stones.

In the second case since a +i ≥ 2x and x ≥ i we have

a ≥ 2x - i ≥ x

and the second player again makes the same move suing the other pile and he gets a -x and a+i - x stones. In both cases the differences between the stones remains i ≤ 1. Eventually, the number of stones will become 1.1 or 0,1 and the first player loses the game.

It remains to consider the case when b - a > 1. The first player takes second pile and moves y st y stones from tones t the first pile. He gets piles with a+y and b - 2y stones respectively. We

show that it is always possible to choose y such that

S = l(a + y) - ( b- 2y)l ≤ 1.

Indeed, if b - a = 3k + j for j = -1,0,1,then by taking y = k we obtain S = l j l ≤1.

Therefore with his first move the first player makes the difference between the stones less than or equal to 1 and, according to the first part of the proof, he wins the games.

Problems

Combinatorial games 1.

A pile of a stones is given . Two players play the following game: each of them in turn takes 1, 2, or 3 stones. The player who takes the last stone wins. Determine, in terms of a, who has a winning strategy.

Combinatorial games 2.

Two piles comprising a and b candies are given. Each of two players in turn eats all the candies in one of the piles and splits the other pile in to two (not necessarily equal in size) non-empty piles. The player who has no move loses the game. Who has a winning strategy?

Combinational games 3.

Two piles of M and N stones are given. Two players in turn take an arbitrary number of stones from tone of the piles the player who takes the last stone wins. Who has a winning strategy?

Combinatorial games4.

All cells of a 4 X 4 table are painted white. In turn two players paint a white cell in black. If a player makes a move, after which there is a black square 2 X 2, the player loses. Who has a winning strategy?

Combinatorial games 5.

Two piles of a and b stones are given. Two players in turn are allowed to remove all stones from one of the piles and if there is one stone in the second pile the player wins; if not the player splits the stones from this pile into two (not necessarily distinct) piles. Who has a winning strategy?

Solutions.

Combinatorial games 1.

Suppose a is divisible by 4, i.e. a = 4k. The second player has the following symmetric winning strategy. Whenever the first player takes following symmetric winning strategy. Whenever the first player takes x, x ϵ{1,2,3} stones he takes 4 - x stones. Since x ϵ {1,2,3} implies

4 - x ϵ{1,2,3}

his move is possible. After one move of the first player and one move of the second one the number of stones is reduced by 4 and therefore after k moves there are no stones left, so the second player wins.

When a is not divisible by 4, i.e. a =4k + i for 0< i ≤ 3 then player wins. He takes i stones and then follows the above strategy.

Combinatorial games 2.

We start by considering small values of the number of candies. If follows from the condition of the problem that a player who tires to split a pile of 1 candy loses. Therefore a player who splits a pile fo two candies wins. There is only one way to split a pile of 3 candies - one pile of 1 and one the pile of 2. The next player now will choose to eat 1 candy and to split the pile of 2 and will win. Thus, a player who splits a pile of 3 candies loses. A plie of 4 can be divided into two piles of 1 and 3 candies which implies that a player who divides a pile of 4 wins.

We come to an assertion that if a player splits a pile with an odd number of candies he loses and when he splits a pile of an even number of candies he has a strategy to win. We prove the above assertion by induction on the number of candies.

For 1 or 2 candies the assertion is obvious.

Suppose it is true for any pile of k candies for k ≤ 2n.

We prove the assertion for piles with 2n+1 and 2n+2 candies.

Assume that a player splits a pile of 2n+1 candies. As a result he gets a pile of an even number of candies and this number is not greater than 2n. The next player may choose to divide exactly this pile and by the induction hypothesis he can win. So, the first player loses.

Suppose a player divided a pile of 2n+2 candies into two piles having 1 and 2n-1 candies each. No matter the choice of the next player he has to divide a pile of odd number of candies and this number is less that 2n. By the induction hypothesis he loses.

Return to the main problem. If both a and b are odd then the first player has to divide one of them. According to our assertion he loses. If at least one of a and b is even then the first player may choose to pile the pile with an even number of candies and therefore he has a winning strategy.

Combinatorial game3.

Suppose first that M = N= 1. The first player takes one of the stones and loses. If M =1, N= 2, the first player takes one of the stones from the second pile, this puts the second player in the above unpleasant position and now clearly the second player loses.

The first player could repeat the same idea also in the case M =1 and where N is an arbitrary integer greater than 1: he can take N -1 stones from the second pile and this puts the second player in a losing position.

The above reasoning generalizes in the following way: suppose first that M = N. If the first player takes x stones from one of the piles then the second player takes the same number of stones from the other pile.

The resulting piles will have again an equal number of stones. Using this symmetric strategy the second player wins.

If M ≠ N then the first player with his first move makes the stones in the two piles equal and then follows the above symmetric strategy.

Combinatorial games 4.

Write a number in every cell of the table as shown in the figure.

5

6

7

8

1

2

3

4

5

6

7

8

1

2

3

4

After any move by the first player then second one paints the cell having the same number. It is easy to see that if a black 2X2 square occurs after a move by the second player then such a square exists before the move. Therefore the second player always wins.

Combinatorial games 5.

We try first to solve the problem for small values of a and b, say a ≤ 10 and b ≤ 10 and then to infer a proper assumption.

Consider a 10x 10 table. The cell in the ith column and jth ro represents a game with two piles with i and j stones. Call such cell winning if the player who has the turn wins. And losing otherwise. Write W in a cell that is winning and L in a cell that is losing. So we begin with diagram 1.

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

Diagram 1.

In order to fill the table further we need to know which cells are accessible from the cells are accessible from the cell ( i , j). The follows from the condition of the problem that from ( i , j ) the game "jumps" to a cell (x,y) if and only if x+y = i or x +y =j.

Therefore we fill the table using the following rules.

If all cells ( x , y ) for which x + y = i or x + y = j are winning cells then the cell (i,j) is losing and we write L in it.

If there is at least one losing cell (x,y) with x + y = i or x + y = j then the cell (i,j) is winning, note also that the table is symmetric with respect to the main diagonal.

According to the above observations we easily find that :

(2, 2)(2, 3)(3, 2) and (3,3) are all losing;

All cells (x, y) for which x = 4,5 or 6, or y =4,5 or 6 are winning. We obtain diagram 2.

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

L

L

w

w

w

w

L

L

w

w

w

w

w

w

w

w

w

w

w

w

w

Digram 2.

It is easy to see now that all cells (x, y) for which x, y ϵ {2, 3, 7, 8} are losing. Finally, all remaining cells become winning. We now have diagram 3.

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

L

L

w

w

w

L

L

w

w

w

L

L

w

w

w

L

L

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

w

L

L

w

w

w

L

L

w

w

w

L

L

w

w

w

L

L

w

w

w

w

w

w

w

w

w

w

w

w

Digram 3

Using diagram 3 we have to describe all losing cells. We conclude that a cell (i, j) is losing if and only if i = 2 or i = 3 modulo 5 and j = 2 or j = 3module 5. We prove that this is true in general.

Call all numbers of the form 5k ± 2 good and let all remaining numbers be bad. The basic observation is that the sum of two good numbers is bad, and any bad number can be expressed as a sum of two good numbers. We prove that the second player wins if and only if both a and b are good.

Suppose the number of stones in one of the piles is bad. Without loss of generality let this be a , then a =5k, a =5k +1 or a = 5k +4. The first player removes the stones from the other pile and splits a in to two piles having 2 and 5( k - 1)+3 stones in the first case; 3 and 5( k -1)+3 stones in the second case. Thus the number of stones in both piles is good.

Now, assume both a and b are good. Since the sum of two good numbers is bad the player having the move leaves at least one bad number.

Therefore if a and b are good after the move of the first player there is at least one bad number and the second player can make the number of stones in both piles good. Following this lien eventually the number of stones becomes 2or 3 and then the first player leaves a pile of 1 stone and he loses.

When a or b is not good the first player splits the pile having a bad number of stones into two piles each with a good number of stones and wins.



rev

Our Service Portfolio

jb

Want To Place An Order Quickly?

Then shoot us a message on Whatsapp, WeChat or Gmail. We are available 24/7 to assist you.

whatsapp

Do not panic, you are at the right place

jb

Visit Our essay writting help page to get all the details and guidence on availing our assiatance service.

Get 20% Discount, Now
£19 £14/ Per Page
14 days delivery time

Our writting assistance service is undoubtedly one of the most affordable writting assistance services and we have highly qualified professionls to help you with your work. So what are you waiting for, click below to order now.

Get An Instant Quote

ORDER TODAY!

Our experts are ready to assist you, call us to get a free quote or order now to get succeed in your academics writing.

Get a Free Quote Order Now