Maths Olympiad Prep

Library / /19 of 24

Combinatorics Difficulty 6.9 National Olympiad Prove it Italy

Problem:

Two magicians perform the following act. At the beginning, the first magician shuts the second magician in a booth where he can neither see nor hear anything. To start the game, the first magician invites Daniele, a member of the audience, to place on each square of an n×nn \times n chessboard, at his own discretion, a white or black checker. After that he asks Daniele to point out to him a square CC of his choice. At this point, the first magician chooses a square DD (not necessarily different from CC) and replaces the checker that is on DD with one of the other color (white with black or black with white).

The booth in which the second magician was locked is then opened. Observing the chessboard, the second magician manages to guess which square CC is. For which nn can the two magicians carry out a strategy such that their act always succeeds?

Solution

Solution:

We will solve a slightly more general problem: suppose the chessboard can have any number NN of squares, not necessarily a square number. We will show that the magicians have a strategy if and only if NN is a power of two. In the particular case N=n2N = n^{2}, it follows that nn must be a power of two.

If there is a strategy, then NN is a power of two. Let us count the number DcD_{c} of checker arrangements that the second magician associates with a given square cc. From every possible initial arrangement the first magician can reach one of these by means of exactly one change, so every possible arrangement must be reachable starting from one of the arrangements associated with cc and changing exactly one checker. Since there are NN possible checker changes, Dc2N/ND_{c} \geq 2^{N} / N. On the other hand the sum of the numbers DcD_{c} as cc ranges over the NN possible squares is less than or equal to 2N2^{N}. It follows that Dc=2N/ND_{c} = 2^{N} / N for every square cc, so NN divides 2N2^{N}.

If NN is a power of two, then there is a strategy. For N=1N = 1 the second magician cannot be wrong. For N=2N = 2, let us call the two squares xx and yy: the magicians agree to have on square xx a white checker if Daniele chose xx, and a black checker if Daniele chose yy. Now, it suffices to show that if the magicians have a strategy for N=aN = a and for N=bN = b, then they have a strategy for N=abN = ab. The strategy consists in imagining the squares arranged in an a×ba \times b grid - with aa rows and bb columns - and stipulating that a row or column is white if it contains an even number of white checkers, black otherwise. In this way, by changing the color of a checker, exactly the color of the row and of the column on which it lies changes. The first magician determines the row and the column on which the square chosen by Daniele lies, and uses the strategies for N=aN = a and N=bN = b on the colors of the rows and of the columns respectively, then decides to change the color of exactly one row and one column, and replaces the checker that is at their intersection. The second magician considers the colors of the rows and of the columns, and by applying the strategies of the cases N=aN = a and N=bN = b determines on which row and on which column the square chosen by Daniele must lie.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from it; metadata (topic, difficulty) added by this project.