Maths Olympiad Prep

Library / /8 of 8

, 2015

Combinatorics Difficulty 7.6 National Olympiad, round 2 Prove it Slovenia

There are nn lights in a line, n3n \ge 3, numbered with numbers 1 through nn. At the beginning each odd light in the line is turned on and each even light is turned off. In each move we may simultaneously change the state of three consecutive lights (turn on or turn off).

a. Prove that the order of the moves we make is not important for the final state of the lights.

b. For which numbers nn can we in a finite number of moves reach a state when each odd light in the line is turned off and each even light is turned on?

Solution

a. Let's look at what happens with the state of one light when executing a move. Each move either changes or preserves the state of the light. Thus the final state of some light only depends on the number of moves made that change the state of that light, and not on the order of the moves made. Therefore the final state of all the lights also does not depend on the order of the moves made.

b. This is possible for exactly those nn which are divisible by 3.
Suppose first that nn is divisible by 3 and let's prove that in this case we can indeed reach the desired state. Let PiP_i be the move where we change the states of the ii-th, (i+1)(i+1)-st, and (i+2)(i+2)-nd light in the line. Since nn is divisible by 3 and each move changes the state of 3 lights we can change the states of all the lights in the row by making n3\frac{n}{3} moves P1,P4,P7,,Pn2P_1, P_4, P_7, \dots, P_{n-2}, and thus reach the desired state.

Now let's prove that we can reach the desired state only if nn is divisible by 3. We already know that the order of the moves is not important, so we may assume that we make moves PiP_i in the increasing order determined by ii. If we make the move PiP_i twice the state of the light is preserved. Therefore we may also assume that we make each move PiP_i at most one time. This basically means that we only need to decide for each move PiP_i if we make it or not. At the end each odd light must be turned off and each even light turned on. Since we need to change the state of the 1st light, which can only be done by the move P1P_1, we must make the move P1P_1. After this move the first three lights are already in the desired state. Since P2P_2 is the only other move that changes the state of the 2nd light we must not make this move. Among the moves P3,P4,P5,P_3, P_4, P_5, \dots the move P3P_3 is the only one that changes the state of the 3rd3\text{rd} light, thus we must also not make this move. Now we are at the move P4P_4 and we make a similar argument. We need to change the state of the 4th4\text{th} light, hence we must make the move P4P_4. After this move the 4th4\text{th}, 5th5\text{th}, and 6th6\text{th} light are in the desired state, so we must not make the move P5P_5 nor the move P6P_6. We continue in a similar matter, we make move P7P_7 and don't make moves P8P_8 and P9P_9, and so on. This means that we must necessarily make the sequence of moves P1,P4,P7,P_1, P_4, P_7, \dots. For this sequence to change the state of all the lights in the line, nn must be divisible by 3. Indeed, if nn has remainder 1 when divided by 3, then we will not change the state of the last light since the move PnP_n is not allowed as it only changes the state of one light. Similarly, if nn has remainder 2 when divided by 3, then we will not change the state of the last two lights since the moves Pn1P_{n-1} and PnP_n are not allowed.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.