Olympiad Maths Prep

Track / Stage 7 / 287 of 300 #1687 of 2000

Problem 1687

National olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.8 Prove it Canadian Mathematical Olympiad · Canada

Problem:

David and Jacob are playing a game of connecting n3n \geq 3 points drawn in a plane. No three of the points are collinear. On each player's turn, he chooses two points to connect by a new line segment. The first player to complete a cycle consisting of an odd number of line segments loses the game. (Both endpoints of each line segment in the cycle must be among the nn given points, not points which arise later as intersections of segments.) Assuming David goes first, determine all nn for which he has a winning strategy.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Solution:

Answer: David has a winning strategy if and only if n2(mod4)n \equiv 2 (\bmod 4).

Call a move illegal if it would cause an odd cycle to be formed for the first time. First we show that if nn is odd, then any strategy where Jacob picks a legal move if one is available to him causes him to win. Assume for contradiction that Jacob at some point has no legal moves remaining. Since the graph representing the game state has no odd cycle, it must be bipartite. Let aa and bb be the sizes of the two sets in the bipartition of the graph. If there is some edge not already added between the two sets, adding this edge would be a legal move for Jacob. Therefore the graph must be a complete bipartite graph with all of its abab edges present. However, since a+b=na + b = n which is odd, one of aa or bb must be even and thus the graph contains an even number of edges. Moreover, since it is Jacob's turn, the graph must contain an odd number of edges, which is a contradiction. Therefore Jacob has a winning strategy for all odd nn.

Now consider the case where nn is even. Call a graph good if the set of vertices of degree at least 1 are in a perfect matching (a set of non-adjacent edges that includes every vertex of the graph). The key observation is that either player has a strategy to preserve that the graph is good while increasing the number of vertices of degree at least 1. More precisely, if the graph was good at the end of a player's previous turn and there are fewer than nn vertices of degree at least 1, then at the end of his current turn he can always ensure that: (1) the graph is good and (2) there are at least two more vertices of degree 1 since the end of his previous turn. Let AA be the set of vertices of degree at least 1 at the end of the player's previous turn and BB be the set of remaining vertices where B>0|B| > 0. Since the vertices of AA have a perfect matching, A|A| is even, and since nn is even, so is B|B|. If the other player adds an edge between two vertices of AA, add an edge between two vertices of BB. If the other player adds an edge between two vertices of BB, add an edge between one of those vertices and a vertex of AA (but on the first round, when AA is empty, respond by adding an edge between two other vertices of BB). If the other player adds an edge between a vertex in AA and a vertex in BB, then since B|B| is even, there must be another vertex of BB. Connect these two vertices in BB with an edge. None of these moves can form a cycle and thus are legal. Furthermore, all of them achieve (1) and (2), proving the claim.

We now show that David has a winning strategy if n2(mod4)n \equiv 2 (\bmod 4). Since the graph begins empty and therefore good, David has a strategy of legal moves to ensure that the graph contains a perfect matching after no more than nn moves. After this, let David implement any strategy where he picks a legal move if one is available to him. Assume for contradiction that there is a turn where David has no legal moves. This graph must be a complete bipartite graph containing a perfect matching. If one of the sets in the bipartition has size greater than n/2n / 2, it must contain two vertices matched in the perfect matching, which is impossible. Therefore there are n/2n / 2 vertices in each part and n2/4n^2 / 4 edges have been added in total, which is an odd number. This contradicts the fact that it is David's turn, and proves the result for n2(mod4)n \equiv 2 (\bmod 4).

Finally, consider the case that n0(mod4)n \equiv 0 (\bmod 4). Note that after David's first turn, the graph contains a single edge and thus is good. This implies that Jacob can ensure the graph contains a perfect matching and win by the above parity argument.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.