Skip to main content
OlympiadHQ

Browse · MathNet

Print

XIX Asian Pacific Mathematics Olympiad

counting and probability

Problem

A regular ()-array of lights is defective, so that toggling the switch for one light causes each adjacent light in the same row and in the same column as well as the light itself to change state, from on to off, or from off to on. Initially all the lights are switched off. After a certain number of toggles, exactly one light is switched on. Find all the possible positions of this light.
Solution
We assign the following first labels to the 25 positions of the lights:
11011
00000
11011
00000
11011
For each on-off combination of lights in the array, define its first value to be the sum of the first labels of those positions at which the lights are switched on. It is easy to check that toggling any switch always leads to an on-off combination of lights whose first value has the same parity (the remainder when divided by 2) as that of the previous on-off combination.

The rotation of the first labels gives us another labels (let us call it the second labels) which also makes the parity of the second value (the sum of the second labels of those positions at which the lights are switched on) invariant under toggling.
10101
10101
00000
10101
10101
Since the parity of the first and the second values of the initial status is 0, after certain number of toggles the parity must remain unchanged with respect to the first labels and the second labels as well. Therefore, if exactly one light is on after some number of toggles, the label of that position must be 0 with respect to both labels. Hence according to the above pictures, the possible positions are the ones marked with 's in the following picture:
Now we demonstrate that all five positions are possible: Toggling the positions checked by (the order of toggling is irrelevant) in the first picture makes the center the only position with light on and the second picture makes the position the only position with light on. The other 's can be obtained by rotating the second picture appropriately.
tt
tttt
t
ttt
t
Final answer
The center (row 3, column 3) and the four positions (row 2, column 2), (row 2, column 4), (row 4, column 2), (row 4, column 4).

Techniques

Invariants / monovariantsColoring schemes, extremal arguments