Maths Olympiad Prep

Library / /53 of 63

Combinatorics Difficulty 7.6 National olympiad, round 2 Prove it Japan

Consider filling each square of an 100×100100 \times 100 table with one of the letters J, M, or O. A 2×22 \times 2 square of the table is called a good block if it satisfies one of the following conditions:
* The four squares have exactly one type of letter.
* The four squares have exactly two types of letters, and each letter appears twice.
* The four squares have exactly three types of letters, and the lower-left and upper-right squares have the same letter.
Find the number of ways of filling the 10000 squares of the table satisfying the following two conditions:
* Every 2×22 \times 2 square of the table is a good block.
* Among pairs of two adjacent squares (sharing an edge) of the table, there are exactly 10000 pairs whose two squares have different letters. Here, two pairs where the order of squares is just swapped are considered as the same pair and are counted only once.
Note that we distinguish two ways of filling which can be obtained from each other by rotations or reflections.

Solution

(198100)32100\displaystyle \binom{198}{100} \cdot 3 \cdot 2^{100}

STEP 1 In this step, we give (198100)32100\binom{198}{100} \cdot 3 \cdot 2^{100} possible ways of filling satisfying the two conditions. Let 1,,99\ell_1, \dots, \ell_{99} be the horizontal grid lines of the table, and let 1,,99\ell'_1, \dots, \ell'_{99} be the vertical grid lines of the table. We have exactly (198100)\binom{198}{100} ways to choose 100 lines from 198 lines 1,,99,1,,99\ell_1, \dots, \ell_{99}, \ell'_1, \dots, \ell'_{99}. Furthermore, there are 321003 \cdot 2^{100} sequences a1,,a101a_1, \dots, a_{101} of letters J, M, and O such that adjacent letters are different. We fix one way of choosing 100 grid lines and one sequence a1,,a101a_1, \dots, a_{101}. For these choices, we give a way of filling the 100×100100 \times 100 table as follows:
Let ss be the number of the horizontal grid lines among the chosen 100 grid lines. Then, there are 100s100-s vertical grid lines among the chosen 100 lines, and the 100×100100 \times 100 table is divided into (s+1)(101s)(s+1)(101-s) many rectangular-shaped blocks. For 1is+11 \le i \le s+1 and 1j101s1 \le j \le 101-s, let [i,j][i, j] denote the block located at the ii-th row from the top and the jj-th column from the left. Then, for each ii and jj, we fill the squares in the block [i,j][i, j] with the letter ai+j1a_{i+j-1}.

By this way of filling, the squares within the same block have the same letter. On the other hand, two squares in adjacent blocks have different letters since adjacent letters in the sequence a1,,a101a_1, \dots, a_{101} are different.

Lemma 1. This way of filling satisfies the first condition of the problem.

Proof of Lemma 1. We fix a 2×22 \times 2 square in the 100×100100 \times 100 table. Let NN be the number of chosen grid lines passing through the interior of the 2×22 \times 2 square. The possibility of NN is either N=0,1,2N=0, 1, 2. When N=0N=0, the 2×22 \times 2 square is contained in one block, and the four squares have exactly one type of letter. When N=1N=1, the 2×22 \times 2 square crosses over two blocks. In this case, the four squares in the 2×22 \times 2 square have exactly two types of letters, and each letter appears twice. When N=2N=2, the 2×22 \times 2 square crosses over four blocks. Let [i,j][i, j] be the block containing the upper-right square of the 2×22 \times 2 square. Then, the block [i+1,j1][i+1, j-1] contains the lower-left square of the 2×22 \times 2 square. By the way of filling, those two squares have the same letter. In any case, it has been shown that the 2×22 \times 2 square is a good block, which completes the proof of Lemma 1. ■

Lemma 2. This way of filling satisfies the second condition of the problem.

Proof of Lemma 2. By the way of filling, for a pair of two adjacent squares of the table, the following two conditions are equivalent:
* The two squares have different letters.
* The two squares are separated by one of the chosen 100 grid lines.
Therefore, we conclude that there are exactly 100100=10000100 \cdot 100 = 10000 pairs whose two squares have different letters, which completes the proof of Lemma 2. ■

Thus, we have established a way of filling from a choice of 100 grid lines and a choice of a sequence. Since different choices give different fillings, we have proved that there are at least (198100)32100\binom{198}{100} \cdot 3 \cdot 2^{100} possible ways of filling satisfying the two conditions.

STEP 2 We suppose that the squares of the 100×100100 \times 100 table are filled to satisfy the two conditions. In this step, we will prove that such way of filling is one of the ways given in STEP 1.

Let (i,j)(i, j) denote the square in the ii-th row from the top and jj-th column from the left. Furthermore, f(i,j)f(i, j) denotes the letter written in the square (i,j)(i, j).

First, we will prove the following two lemmas.

Lemma 3. Let aa and bb be integers satisfying 1a,b991 \le a, b \le 99. Then, the two conditions f(a,b)=f(a,b+1)f(a, b) = f(a, b+1) and f(a+1,b)=f(a+1,b+1)f(a+1, b) = f(a+1, b+1) are equivalent. Furthermore, the two conditions f(a,b)=f(a+1,b)f(a, b) = f(a+1, b) and f(a,b+1)=f(a+1,b+1)f(a, b+1) = f(a+1, b+1) are equivalent.

Proof of Lemma 3. We will show that f(a,b)=f(a,b+1)f(a, b) = f(a, b+1) implies f(a+1,b)=f(a+1,b+1)f(a+1, b) = f(a+1, b+1). Let NN denote the number of types of letters written in the four squares (a,b),(a,b+1),(a+1,b),(a+1,b+1)(a, b), (a, b+1), (a+1, b), (a+1, b+1). Here, we have N3N \le 3 by the definition of a good block. If N=1N=1, then we have f(a+1,b)=f(a+1,b+1)f(a+1, b) = f(a+1, b+1) and it shows the assertion. If N=2N=2, then each letter appears exactly twice by the definition of a good block, and hence, we conclude that f(a,b)=f(a,b+1)f(a, b) = f(a, b+1) implies f(a+1,b)=f(a+1,b+1)f(a+1, b) = f(a+1, b+1). If N=3N=3, then we have f(a+1,b)=f(a,b+1)f(a+1, b) = f(a, b+1) by the definition of a good block. Since N=3N=3, we have f(a,b)f(a,b+1)f(a, b) \neq f(a, b+1) and it shows the assertion.
We have proved that f(a,b)=f(a,b+1)f(a, b) = f(a, b+1) implies f(a+1,b)=f(a+1,b+1)f(a+1, b) = f(a+1, b+1). The other implications can be proved similarly. ■

Lemma 4. Let aa and bb be integers satisfying 1a,b991 \le a, b \le 99. If
f(a,b)f(a,b+1)f(a+1,b+1)f(a+1,b)f(a,b), f(a,b) \neq f(a,b+1) \neq f(a+1,b+1) \neq f(a+1,b) \neq f(a,b),
then we have f(a+1,b)=f(a,b+1)f(a+1, b) = f(a, b+1).

Proof of Lemma 4. Let NN denote the number of types of letters written in the four squares (a,b)(a, b), (a,b+1)(a, b+1), (a+1,b)(a+1, b), and (a+1,b+1)(a+1, b+1). Here, we have N3N \le 3 by the definition of a good block, and N2N \ge 2 by the assumption f(a,b)f(a,b+1)f(a, b) \neq f(a, b+1). When N=2N=2, the assertion f(a+1,b)=f(a,b+1)f(a+1, b) = f(a, b+1) follows from the assumption f(a,b)f(a,b+1)f(a+1,b+1)f(a, b) \neq f(a, b+1) \neq f(a+1, b+1). When N=3N=3, the assertion f(a+1,b)=f(a,b+1)f(a+1, b) = f(a, b+1) follows from the definition of a good block. ■

When two squares sharing an edge have different letters, we call such shared edge a boundary edge. From Lemma 3, for each integer aa with 1a991 \le a \le 99, we conclude that either
* all edges shared by a square on the aa-th row and a square on the (a+1)(a+1)-th row are boundary edges, or
* none of them are boundary edges.
The same assertion holds for columns as well. Therefore, the union of the boundary edges forms a collection of some of the grid lines 1,,99,1,,99\ell_1, \dots, \ell_{99}, \ell'_1, \dots, \ell'_{99}. Let ss denote the number of horizontal grid lines obtained by the horizontal boundary edges, and let tt denote the number of vertical grid lines obtained by the vertical boundary edges. Then, by the boundary edges, the 100×100100 \times 100 table is divided into (s+1)(t+1)(s+1)(t+1) many rectangular-shaped blocks. By the definition of a boundary edge, the squares within the same block have the same letter, and two squares in adjacent blocks have different letters. Therefore, the number of pairs of adjacent squares sharing a boundary edge is exactly 100(s+t)100(s+t). Hence, by the second condition of the problem, we conclude that t=100st = 100-s.

For 1is+11 \le i \le s+1 and 1jt+1=101s1 \le j \le t+1 = 101-s, let [i,j][i, j] denote the block located at the ii-th row from the top and the jj-th column from the left. Note that the squares in the block [i,j][i, j] have the same letter, and we denote the letter by g(i,j)g(i, j). We define a sequence a1,,a101a_1, \dots, a_{101} of letters J, M, and O by
a1=g(1,1),a2=g(2,1),,as+1=g(s+1,1),as+2=g(s+1,2),,a101=g(s+1,t+1). a_1 = g(1, 1), \quad a_2 = g(2, 1), \quad \dots, \quad a_{s+1} = g(s+1, 1), \\ a_{s+2} = g(s+1, 2), \quad \dots, \quad a_{101} = g(s+1, t+1).
Then, adjacent letters of the sequence are different.

By Lemma 4, we have
g(i,j)={g(i+j1,1)if i+j1s+1g(s+1,i+js1)otherwise=ai+j1 g(i,j) = \begin{cases} g(i+j-1, 1) & \text{if } i+j-1 \le s+1 \\ g(s+1, i+j-s-1) & \text{otherwise} \end{cases} = a_{i+j-1}
for any 1is+11 \le i \le s+1 and 1jt+1=101s1 \le j \le t+1 = 101-s. Therefore, this way of filling coincides with the way given in STEP 1 corresponding to the choice of the 100 grid lines and the sequence a1,,a101a_1, \dots, a_{101}.

By STEP 1 and STEP 2, we conclude that there are exactly (198100)32100\binom{198}{100} \cdot 3 \cdot 2^{100} ways of filling satisfying the two conditions.

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 and solution reproduced as published; topic and difficulty added by this site.