Browse · MathNet
PrintJapan Mathematical Olympiad
Japan counting and probability
Problem
Consider filling each square of an table with one of the letters J, M, or O. A 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 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
STEP 1 In this step, we give possible ways of filling satisfying the two conditions. Let be the horizontal grid lines of the table, and let be the vertical grid lines of the table. We have exactly ways to choose 100 lines from 198 lines . Furthermore, there are sequences of letters J, M, and O such that adjacent letters are different. We fix one way of choosing 100 grid lines and one sequence . For these choices, we give a way of filling the table as follows: Let be the number of the horizontal grid lines among the chosen 100 grid lines. Then, there are vertical grid lines among the chosen 100 lines, and the table is divided into many rectangular-shaped blocks. For and , let denote the block located at the -th row from the top and the -th column from the left. Then, for each and , we fill the squares in the block with the letter .
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 are different.
Lemma 1. This way of filling satisfies the first condition of the problem.
Proof of Lemma 1. We fix a square in the table. Let be the number of chosen grid lines passing through the interior of the square. The possibility of is either . When , the square is contained in one block, and the four squares have exactly one type of letter. When , the square crosses over two blocks. In this case, the four squares in the square have exactly two types of letters, and each letter appears twice. When , the square crosses over four blocks. Let be the block containing the upper-right square of the square. Then, the block contains the lower-left square of the square. By the way of filling, those two squares have the same letter. In any case, it has been shown that the 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 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 possible ways of filling satisfying the two conditions.
STEP 2 We suppose that the squares of the 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 denote the square in the -th row from the top and -th column from the left. Furthermore, denotes the letter written in the square .
First, we will prove the following two lemmas.
Lemma 3. Let and be integers satisfying . Then, the two conditions and are equivalent. Furthermore, the two conditions and are equivalent.
Proof of Lemma 3. We will show that implies . Let denote the number of types of letters written in the four squares . Here, we have by the definition of a good block. If , then we have and it shows the assertion. If , then each letter appears exactly twice by the definition of a good block, and hence, we conclude that implies . If , then we have by the definition of a good block. Since , we have and it shows the assertion. We have proved that implies . The other implications can be proved similarly. ■
Lemma 4. Let and be integers satisfying . If then we have .
Proof of Lemma 4. Let denote the number of types of letters written in the four squares , , , and . Here, we have by the definition of a good block, and by the assumption . When , the assertion follows from the assumption . When , the assertion 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 with , we conclude that either all edges shared by a square on the -th row and a square on the -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 . Let denote the number of horizontal grid lines obtained by the horizontal boundary edges, and let denote the number of vertical grid lines obtained by the vertical boundary edges. Then, by the boundary edges, the table is divided into 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 . Hence, by the second condition of the problem, we conclude that .
For and , let denote the block located at the -th row from the top and the -th column from the left. Note that the squares in the block have the same letter, and we denote the letter by . We define a sequence of letters J, M, and O by Then, adjacent letters of the sequence are different.
By Lemma 4, we have for any and . 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 .
By STEP 1 and STEP 2, we conclude that there are exactly ways of filling satisfying the two conditions.
Final answer
binom(198,100) 3 2^100
Techniques
Recursion, bijectionCounting two waysColoring schemes, extremal arguments