Daily

Random

Practice set

Baltic Way 2017 · Problem 10

Combinatorics

Maker and Breaker are building a wall. Maker has a supply of green cubical building blocks, and Breaker has a supply of red ones, all of the same size. On the ground, a row of mm squares has been marked in chalk as place-holders. Maker and Breaker now take turns in placing a block either directly on one of these squares, or on top of another block already in place, in such a way that the height of each column never exceeds nn. Maker places the first block.

Maker bets that he can form a green row, i.e. all mm blocks at a certain height are green. Breaker bets that he can prevent Maker from achieving this. Determine all pairs (m,n)(m, n) of positive integers for which Maker can make sure he wins the bet.

Change pool

When you’re ready

Review material becomes available with the next Daily.

Review

Topics

Games and strategies

Solutions

Solution

Answer: Maker has a winning strategy if m>1m>1 and n>1n>1 are both odd, or if m=1m=1.

Let us refer to the positions of the blocks in the wall by coordinates (x,y)(x, y) where x∈{0,1,…,m−1}x \in\{0,1, \ldots, m-1\} refers to the column and y∈{0,1,…,n−1}y \in\{0,1, \ldots, n-1\} to the height of the block. Consider the different cases according to the parity of the parameters. In addition, there are some exceptional trivial cases.

  1. If m=1m=1, then Maker trivially wins by the first move.
  2. If m>1m>1, but n=1n=1, then Breaker obviously can break the only row.
  3. Suppose mm is even. Then Breaker has a defensive strategy based on the horizontal reflection, i.e. if Maker places a block in (x,y)(x, y), then Breaker places a block in (m−1−x,y)(m-1-x, y). Note that this move is always available for Breaker, because mm is even. It is clear that this reflection strategy breaks all the green rows.
  4. Suppose then nn is even but m>1m>1 is odd. Then Breaker has the same defensive stra-tegy as above based on the horizontal reflection, with one modification: Whenever Maker places a block in the middle column, Breaker does too. Since nn is even, this middle column does not influence the rest of the construction. Hence this reflection strategy breaks all the green rows as above.
  5. Suppose both mm and nn are odd, m>1m>1 and n>1n>1. Maker's strategy is the following: Maker starts with (0,0)(0,0). Maker pairs the positions (2i−1,0)(2 i-1,0) and (2i,0),i=1,2,…,m−12(2 i, 0), i=1,2, \ldots, \frac{m-1}{2}, so that if Breaker places a red block in one of the positions, Maker places a green block in the other position; otherwise Maker does not use the bottom row. Maker's reply to Breaker's (x,y)(x, y) with y>0y>0 is (x,y+1)(x, y+1). This strategy builds a green row at the height 2 .

Contest context

Results from Baltic Way 2017

11 teams

Mean score
4.4 / 5
Scores of 4 or 5
9 / 11
Estonia
5 / 5

Score distribution

01
10
20
31
40
59
All team scores
TeamScore
St. Petersburg5 / 5
Germany5 / 5
Poland5 / 5
Denmark5 / 5
Estonia5 / 5
Lithuania5 / 5
Sweden5 / 5
Norway5 / 5
Finland0 / 5
Iceland5 / 5
Latvia3 / 5