Browse · MathNet
PrintIMO Team Selection Test 2
Netherlands counting and probability
Problem
Prickle and Sting are playing a game on an -board, where and are positive integers. They alternatingly take turns, and Prickle goes first. Prickle must, during his turn, place a pawn on a square which doesn't contain a pawn yet. Sting must, during his turn, also place a pawn on a square which doesn't contain a pawn yet, but additionally, his pawn must be placed in a square that is adjacent to the square in which Prickle placed his pawn the previous turn.
Sting wins once the entire board is completely filled with pawns. Prickle wins if Sting cannot place a pawn in his turn, while there is at least one empty square on the board.
Determine for all pairs of positive integers which of Prickle and Sting has a winning strategy.
Sting wins once the entire board is completely filled with pawns. Prickle wins if Sting cannot place a pawn in his turn, while there is at least one empty square on the board.
Determine for all pairs of positive integers which of Prickle and Sting has a winning strategy.
Solution
We use the convention that is the number of rows, and that is the number of columns. If is even, then we pair the squares of the board as follows: in every column we pair the top two squares, then squares 3 and 4, etc. As the number of rows is even, this pairs the squares of every column completely. Sting can use the following strategy: whenever Prickle places a pawn into one of a pair of squares, Sting places a pawn into the other, which is necessarily adjacent to the pawn that Prickle just placed. After each move of Sting, all pairs contain either zero or two pawns, so Sting can always place a pawn according to this strategy. Therefore Sting can make sure that the entire board is eventually completely filled with pawns, so Sting wins. Analogously, if is even, then Sting has a similar winning strategy.
If , Sting wins after Prickle's first move. If and (or the other way around), Sting can place his first pawn on a square adjacent to the square in which Prickle has just placed his; such an adjacent (empty) square always exists. The board will then be completely filled after Prickle's next move, so Sting has a winning strategy in these cases as well.
Now consider the case . Prickle can follow the following strategy. He places his first pawn in the centre square. Sting must place his pawn either in the same row or in the same column. Without loss of generality, we assume that Sting's pawn is placed in the same column as that of Prickle. Prickle then places a pawn in the remaining square in the middle column. At that point, the left and right columns are completely empty. Sting must place his pawn into one of these columns. Prickle then chooses any square in the other column, all three squares of which are still empty. This forces Sting to place a pawn in that column as well, as the middle column was already completely filled. Now Prickle places a pawn in the only remaining square of that column, after which Sting can no longer place a pawn, while there are two empty squares remaining. Therefore Prickle has a winning strategy if .
The remaining case is that and are both odd, and that at least one of and is at least 5. We consider the case that (the number of columns) is at least 5; the other case is analogous. Prickle can follow the following strategy. Prickle places his pawns into the centre column until it is completely filled with pawns. When it is Prickle's turn again, there is an even number of pawns on the board, all in the three columns in the centre of the board, of which at least the middle one is completely filled. The first and the last column are completely empty. As there is an odd number of squares remaining, either the area to the left of the middle column has an odd number of empty squares remaining, or the area to the right has. Prickle chooses the area which contains an odd number of empty squares, and places his pawns there until that area is full. As the centre column is completely filled, Sting must also place all of his pawns in that area. As this area contained an odd number of empty squares, Prickle is the last player (to be able) to place a pawn in this area. Sting can no longer place a pawn, while the other area contains a column of empty squares, so Prickle wins. (Of course, if Sting runs out of moves earlier, Prickle also wins.)
We conclude that Prickle wins if and are odd and , if and are odd and , and if . Sting wins in all other cases: if and are both even, if , if and , and if and .
If , Sting wins after Prickle's first move. If and (or the other way around), Sting can place his first pawn on a square adjacent to the square in which Prickle has just placed his; such an adjacent (empty) square always exists. The board will then be completely filled after Prickle's next move, so Sting has a winning strategy in these cases as well.
Now consider the case . Prickle can follow the following strategy. He places his first pawn in the centre square. Sting must place his pawn either in the same row or in the same column. Without loss of generality, we assume that Sting's pawn is placed in the same column as that of Prickle. Prickle then places a pawn in the remaining square in the middle column. At that point, the left and right columns are completely empty. Sting must place his pawn into one of these columns. Prickle then chooses any square in the other column, all three squares of which are still empty. This forces Sting to place a pawn in that column as well, as the middle column was already completely filled. Now Prickle places a pawn in the only remaining square of that column, after which Sting can no longer place a pawn, while there are two empty squares remaining. Therefore Prickle has a winning strategy if .
The remaining case is that and are both odd, and that at least one of and is at least 5. We consider the case that (the number of columns) is at least 5; the other case is analogous. Prickle can follow the following strategy. Prickle places his pawns into the centre column until it is completely filled with pawns. When it is Prickle's turn again, there is an even number of pawns on the board, all in the three columns in the centre of the board, of which at least the middle one is completely filled. The first and the last column are completely empty. As there is an odd number of squares remaining, either the area to the left of the middle column has an odd number of empty squares remaining, or the area to the right has. Prickle chooses the area which contains an odd number of empty squares, and places his pawns there until that area is full. As the centre column is completely filled, Sting must also place all of his pawns in that area. As this area contained an odd number of empty squares, Prickle is the last player (to be able) to place a pawn in this area. Sting can no longer place a pawn, while the other area contains a column of empty squares, so Prickle wins. (Of course, if Sting runs out of moves earlier, Prickle also wins.)
We conclude that Prickle wins if and are odd and , if and are odd and , and if . Sting wins in all other cases: if and are both even, if , if and , and if and .
Final answer
Sting wins if at least one of m or n is even, or if (m, n) is (1, 1), (1, 3), or (3, 1). Prickle wins if both m and n are odd with at least one of them at least 5, or if (m, n) = (3, 3).
Techniques
Games / greedy algorithmsInvariants / monovariantsMatchings, Marriage Lemma, Tutte's theorem