Count the number of ways to fill unit squares of a table with two colours, red and blue, such that no two rows and no two columns are painted the same.
Solution
Let be the set of the painting of the table with two colors, red and blue, so that no two rows are painted the same. Since we can color the table with two colors in ways, .
Now let be the set of the painting of the table with the two colors such that no two rows are painted the same and the -th and the -th columns are painted the same. We have to find .
(1) Let us find . 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 ways to color the remaining 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 ways to color the 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 table with the two colors is , 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 ways. We have 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 table with the two colors is . We can color the first and the second column in ways. We have coloring in total.
(2) Let be the set of the painting of the table with the two colors such that no two rows are painted the same and the -th, the -th and the -th columns are painted the same. Let us find . 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 table with the two color is . We can color the first three columns in ways. We have coloring in total.
(3) Let us find . 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 coloring in total.
It is obvious that for mutually distinct , we have , and . Now we find that