Maths Olympiad Prep

Library / Mongolian National Mathematical Olympiad /30 of 31

Mongolian National Mathematical Olympiad

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∣=16⋅15⋅14⋅13|X| = 16 \cdot 15 \cdot 14 \cdot 13.

Now let Bij⊂XB_{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∖(B12∪B13∪B14∪B23∪B24∪B34)∣|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 2⋅4!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 4⋅4⋅3⋅24 \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 2⋅C432 \cdot C_4^3 ways. We have 8⋅4!⋅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 (4⋅3)2(4 \cdot 3)^2. We can color the first and the second column in 66 ways. We have 6⋅(4⋅3)26 \cdot (4 \cdot 3)^2 coloring in total.

(2) Let Bijk⊂XB_{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 2⋅22 \cdot 2. We can color the first three columns in 66 ways. We have 6⋅2⋅26 \cdot 2 \cdot 2 coloring in total.

(3) Let us find ∣B12∩B34∣|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 6⋅2⋅26 \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 ∣Bij∩Bkl∣=∣B12∩B34∣|B_{ij} \cap B_{kl}| = |B_{12} \cap B_{34}|. Now we find that

∣X∖(B12∪B13∪B14∪B23∪B24∪B34)∣=∣X∣−6⋅∣B12∣+∣B123∣+∣B124∣+∣B123∣+∣B124∣+∣B12∩B34∣+∣B134∣+∣B123∣+∣B13∩B24∣+∣B134∣+∣B14∩B23∣+∣B124∣+∣B134∣+∣B234∣+∣B234∣+∣B234∣−∣B123∣−∣B124∣−∣B134∣−∣B234∣=16⋅15⋅14⋅13−6⋅24⋅70+11⋅24=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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.