Skip to main content
OlympiadHQ

Browse · MathNet

Print

Argentine National Olympiad 2016

Argentina 2016 counting and probability

Problem

Agustin and Lucas take turns in marking one cell at a time in a grid. Agustin starts the game. A cell cannot be marked if there are already two marked cells in its row or in its column. The one who cannot move loses. Decide which player has a winning strategy.
Solution
We describe a winning strategy for the second player Lucas. It applies to any grid square with odd . Call a row or column empty, incomplete or full at a certain moment of the game if it contain respectively 0, 1 or 2 marked cells. The strategy of Lucas has two stages.

Stage 1: The first move of Agustin has the following properties. It is in an empty row and an empty column , and after it there are still empty rows left. Call such a move standard. The answer of Lucas to a standard move of Agustin is to choose an empty row and mark the intersection of and column . Such a standard answer is allowed by the rules, and it makes a full column; thus cannot be used later on. Let Lucas give standard answers as long as Agustin makes standard moves (at least Agustin's first move is standard). Observe that each column either empty or full after every standard answer of Lucas, hence Agustin's next move is in an empty column. Since there is a standard answer to any standard move, Lucas cannot lose if all of Agustin's moves are standard. Suppose then that Agustin makes non-standard moves, and let be the first one of them. As explained above, is in an empty column . There are two possibilities: (1) is in an incomplete row ; (2) is in the last empty row remaining. In case (1) there are still empty rows left. Indeed each previous combined move of the two leaves an odd number of empty rows because is odd. So Lucas gives a standard answer again: taking an empty row and marking the intersection of and column . In case (2) all rows are incomplete after . Here Lucas takes any row and marks the intersection of and column , thus making full. This completes stage 1. As a result the table has the following properties: (i) The number of empty rows is even. (ii) The number of incomplete rows is even. (iii) There are no incomplete columns. Indeed is odd and is even after all moves before , while the last combined move of the two decreases by 1 and does not change , in both case 1 and 2. Hence (i) and (ii) hold. As for (iii), it holds after every move of Lucas so far.

Stage 2: Now Lucas makes sure that after each move of his properties (i) - (iii) are preserved. Let us justify that he can achieve this no matter how Agustin plays. Let Agustin make a move in row and column , where is empty. Then was also empty before . This is because by (iii) there were no incomplete columns before , and one cannot move in a full column. So makes both and incomplete, in particular, by (i), is odd after . Hence it is possible for Lucas to mark the intersection of one empty row and column . This is a standard answer which makes full and incomplete. Thus the combined move of Agustin and Lucas decreases by 2 and increases by 2. Hence (i) - (iii) are preserved after the answer of Lucas.

Similarly let Agustin make a move in row and column where is incomplete. As in the previous case, was empty before . So makes full and incomplete. Then by (ii) is odd after . Hence Lucas can mark the intersection of one incomplete row and column , making both and full. The combined move of Agustin and Lucas decreases by 2 and does not change . Again, (i) - (iii) are maintained after the answer of Lucas.

In conclusion, Lucas is able to answer any move of Agustin at the second stage, hence he will not lose. The game is finite; there will be a loser, and it is not Lucas. Hence eventually Agustin loses and thus Lucas wins.
Final answer
Lucas (the second player) has a winning strategy.

Techniques

Games / greedy algorithmsInvariants / monovariants