Maths Olympiad Prep

Library / /33 of 34

Combinatorics Difficulty 7.2 National Olympiad, round 2 Prove it Mongolia

Count the number of ways to fill unit squares of a 4×44 \times 4 table with two colours, red and blue, such that no two rows and no two columns are painted the same.

Solution

Let XX be the set of the painting of the 4×44 \times 4 table with two colors, red and blue, so that no two rows are painted the same. Since we can color the 1×41 \times 4 table with two colors in 24=162^4 = 16 ways, X=16151413|X| = 16 \cdot 15 \cdot 14 \cdot 13.

Now let BijXB_{ij} \subset X be the set of the painting of the 4×44 \times 4 table with the two colors such that no two rows are painted the same and the ii-th and the jj-th columns are painted the same. We have to find X(B12B13B14B23B24B34)|X \setminus (B_{12} \cup B_{13} \cup B_{14} \cup B_{23} \cup B_{24} \cup B_{34})|.

(1) Let us find B12|B_{12}|. Thus the first and the second columns are painted the same and no two rows are painted the same. There are three cases.

(i) Suppose that the first and the second columns are painted with only one color, red or blue. Then there are 4!4! ways to color the remaining 4×24 \times 2 table with the two colors so that no two rows are painted the same. Considering the color of the first and second column, there are 24!2 \cdot 4! ways to color the 4×44 \times 4 table in total.

(ii) Suppose that the first and the second columns are painted in such a way that three unit squares in the columns have the same color and the remaining one has the other color. Then the number of ways to color the remaining 4×24 \times 2 table with the two colors is 44324 \cdot 4 \cdot 3 \cdot 2, since one row can be painted arbitrarily and the other three rows must be painted differently. We can color the first and the second column in 2C432 \cdot C_4^3 ways. We have 84!48 \cdot 4! \cdot 4 coloring in total.

(iii) Suppose that the first and the second columns are painted in such a way that two unit squares in age columns have the same color and the remaining two has the other color. Then the number of ways to color the remaining 4×24 \times 2 table with the two colors is (43)2(4 \cdot 3)^2. We can color the first and the second column in 66 ways. We have 6(43)26 \cdot (4 \cdot 3)^2 coloring in total.

(2) Let BijkXB_{ijk} \subset X be the set of the painting of the 4×44 \times 4 table with the two colors such that no two rows are painted the same and the ii-th, the jj-th and the kk-th columns are painted the same. Let us find B123|B_{123}|. Thus the first, the second and the third columns are painted the same and no two rows are painted the same.

(i) Suppose that the first three columns are painted in such a way that there exist three unit squares in the columns that have the same color. Then by the Dirichlet's box principle there exist two same rows, which is a contradiction. Therefore there is no such coloring.

(ii) Suppose that the first three columns are painted in such a way that two unit squares in the columns have the same color and the remaining two has the other color. Then the number of ways to color the remaining 4×14 \times 1 table with the two color is 222 \cdot 2. We can color the first three columns in 66 ways. We have 6226 \cdot 2 \cdot 2 coloring in total.

(3) Let us find B12B34|B_{12} \cap B_{34}|. Thus the first two columns are painted the same, the 3rd and the 4th columns are painted the same, and no two rows are painted the same.

(i) Suppose that the first two columns are painted in such a way that there exist three unit squares in the columns that have the same color. Then by the Dirichlet's box principle there exist two same rows, which is a contradiction. Therefore there is no such coloring.

(ii) Suppose that the first three columns are painted in such a way that two unit squares in the columns have the same color and the remaining two has the other color. Then so is for the 3rd and the 4th columns. In this case we have 6226 \cdot 2 \cdot 2 coloring in total.

It is obvious that for mutually distinct i,j,k,li, j, k, l, we have Bij=B12|B_{ij}| = |B_{12}|, Bijk=B123|B_{ijk}| = |B_{123}| and BijBkl=B12B34|B_{ij} \cap B_{kl}| = |B_{12} \cap B_{34}|. Now we find that

X(B12B13B14B23B24B34)=X6B12+B123+B124+B123+B124+B12B34+B134+B123+B13B24+B134+B14B23+B124+B134+B234+B234+B234B123B124B134B234=1615141362470+1124=33864. \begin{align*} |X \setminus (B_{12} \cup B_{13} \cup B_{14} \cup B_{23} \cup B_{24} \cup B_{34})| &= |X| - 6 \cdot |B_{12}| + |B_{123}| + |B_{124}| \\ &\quad + |B_{123}| + |B_{124}| + |B_{12} \cap B_{34}| + |B_{134}| + |B_{123}| + |B_{13} \cap B_{24}| \\ &\quad + |B_{134}| + |B_{14} \cap B_{23}| + |B_{124}| + |B_{134}| + |B_{234}| + |B_{234}| + |B_{234}| \\ &\quad - |B_{123}| - |B_{124}| - |B_{134}| - |B_{234}| \\ &= 16 \cdot 15 \cdot 14 \cdot 13 - 6 \cdot 24 \cdot 70 + 11 \cdot 24 \\ &= 33864. \end{align*}

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.