Maths Olympiad Prep

Library / /477 of 520

Combinatorics Difficulty 5.9 AIME, harder Prove it

28. In a single-player card game, there are mnm n cards that are white on one side and black on the other, played on an m×nm \times n rectangular board. Initially, the mn1m n-1 small squares of the rectangular board are covered with cards white side up, and only one corner square is covered with a card black side up. In each move, we can remove a card that is black side up, but we must flip all the cards on the adjacent squares (i.e., those sharing an edge with the square of the removed card). Find all pairs of positive integers (m,n)(m, n) such that all the cards can be removed from the board.

Solution

Proof: Assume it is possible to remove all the cards. Each time an operation is performed, record the number of cards that have already been removed and are adjacent to the card being removed, and let the sum of these numbers be σ\sigma.

The number recorded when the first card is removed is 0. Then, for each card removed, it starts as white, and it turns black only when an odd number of adjacent cards have been removed. Thus, the number recorded is an odd number. Therefore, σ\sigma is the sum of mn1m n-1 odd numbers, hence
σ=mn1(mod2) \sigma=m n-1(\bmod 2) \text {. }

On the other hand, consider each pair of adjacent cards. The number of cards not being the one removed is 1. Therefore, σ\sigma equals the number of all adjacent pairs of small squares on the rectangular board, i.e.,
σ=m(n1)+n(m1) \sigma=m(n-1)+n(m-1) \text {. }

To remove all the cards, it must be true that
mn1m(n1)+n(m1)(mod2) m n-1 \equiv m(n-1)+n(m-1)(\bmod 2) \text {, }

which is equivalent to (m1)(n1)(m-1)(n-1) being even. Thus, the necessary condition for removing all the cards is that at least one of mm and nn is odd.

Next, we prove that this condition is also sufficient. By symmetry, assume m=2k1m=2 k-1. Let the position of the card be (i,j)(i, j), where 1im,1jn1 \leqslant i \leqslant m, 1 \leqslant j \leqslant n, and assume the card at (1,1)(1,1) is black side up. We remove the cards at (i,1)(i, 1) in order, i=1,2,,mi=1,2, \cdots, m. If n=1n=1, the conclusion holds. Assume n2n \geqslant 2, then all the cards at (i,2)(i, 2) are black side up. We remove the cards at (2i1,2)(2 i-1,2) in order, i=1,2,,ki=1,2, \cdots, k, each card at (2i,2)(2 i, 2) is flipped twice, so it remains black side up, and then we remove these cards. If n=2n=2, the conclusion holds. Otherwise, all the cards at (i,3)(i, 3) are black side up. Repeat the above process until the given nn.

In summary, the pairs of positive integers (m,n)(m, n) that allow all the cards to be removed from the rectangular board satisfy: at least one of mm and nn is odd.

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.