Maths Olympiad Prep

Library / /151 of 158

Combinatorics Difficulty 7.1 National Olympiad, round 2 Prove it Estonia

On a switchboard there are nmnm lamps arranged in an n×mn \times m array. In the beginning all lamps are off. At each step one can switch three consecutive lamps in one row or in one column, changing the state of each lamp to the opposite. For which pairs of positive integers (n,m)(n, m) is it possible to achieve the situation, where all the lamps are switched on?

Solution

If nn (or mm) is a multiple of 33, then we can divide all lamps in each column (or row) into groups of 33 and switch the lamps on by the groups.

If neither nn nor mm is a multiple of 33, then color all lamps by diagonals with three colors (Fig. 10). Then each switching changes the state of exactly one lamp of each color, therefore each switching changes the parity of the number of lamps switched on for each color. Since in the beginning all lamps are off, the parity of the lamps switched on for each color always stays the same.

Let n=3a+bn = 3a + b and m=3c+dm = 3c + d, where aa and cc are nonnegative integers and bb and dd are either 11 or 22. In regions of sizes 3a×3c3a \times 3c, b×3cb \times 3c and 3a×d3a \times d the numbers of lamps of each color are equal and hence their parities are equal, but in the remaining b×db \times d region there is either 11 lamp (Fig. 11), 22 lamps of different colors (Fig. 12 and 13), or 44 lamps, of which 22 are of one color and two others of the two other colors (Fig. 14), hence the parities of the numbers of lamps of each color are not equal. Consequently, it is not possible to switch on all lamps.

Figure 1
Fig. 10

Figure 2
Fig. 11

Figure 3
Fig. 12

Figure 4
Fig. 13

Figure 5
Fig. 14

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.