Browse · MathNet
PrintJapan Mathematical Olympiad
Japan counting and probability
Problem
Let be a positive integer. Determine all integers satisfying the following condition.
> There is a board. When distinct cells are chosen and colored black, while the other cells are colored white, the minimum number of the squares which have both black and white cells is .
> There is a board. When distinct cells are chosen and colored black, while the other cells are colored white, the minimum number of the squares which have both black and white cells is .
Solution
In this answer, the rows are numbered from the top and, the columns are numbered from the left. We denote the cell in the -th row, the -th column by , square consisting of , , , by . Also, a set of cells is said to be mixed, if it has both black and white cells.
First, we consider the case . Let , be integers satisfying . We color cells black if , or , and color the other cells white. In this coloring, is mixed if and only if , or , , or , . Hence, the number of mixed squares is if , if . Therefore, does not satisfy the condition in the problem statement, while for , we can color the board such that there are exactly mixed squares.
Secondly, we consider the case . We show that there exist at least mixed squares in this case. In the case that all rows are mixed, there exists for any such that the colors of and are different, and is mixed for such . Hence, the number of mixed squares is at least . Similarly, this argument works also in the case all columns are mixed. Therefore, we only have to check the case when there exist a row and a column whose all cells have the same color. We show the following lemma.
Lemma. Let be positive integers. Each cell in a board is colored black or white. If all cells in the first row and the first column have the same color, and there are cells which have the other color, the number of mixed squares is at least .
Proof. Since the case is trivial, we assume that . When the number of mixed rows is and the number of mixed columns is , we show that there exist at least mixed squares. Since rows and columns are mixed if they have a cell whose color is different from that of the top left cell, holds. We only have to show it since by AM-GM inequality.
We create a graph whose vertices are mixed squares and the set of edges are defined as follows. (The terms of graph theory in the following are explained at the end of this answer.)
For each integer , if the -th row is mixed, we choose an integer such that and have different colors and connect and by an edge. Similarly, for each integer , if the -th column is mixed, we choose an integer such that and have different colors and connect and by an edge.
We show that has no cycle. Take any edge in . Without loss of generality, we can assume that this edge connects and for some and . By the definition of the set of edge of , none of the other edges connect a square located in the 1st to -th rows and a square located in the -th to -th rows, from which has no cycle.
has at least one vertex by . Since has no cycle, each connected component of is a tree, and the number of the vertices is bigger than that of the edges exactly by 1. Therefore, denoting the number of the vertices and the edges and the connected components of by , , respectively, we have . By the definition of the set of edges, holds and, combined with , we have , which is what we wanted to show. ■
We take such that all the cells in the -th row and -th column have the same color. We denote the number of cells with the other color in the 1st to -th rows, the 1st to -th columns by , in the 1st to -th rows, the -th to -th columns by , in the -th to -th rows, the 1st to -th columns by , in the -th to -th rows, the -th to -th columns by .
Denoting by , the number of mixed squares is at least by the lemma. We define for and . Then, is weakly monotonically increasing and for any . Also, since for any ,
equals to or , we have by and have
Therefore, there exist at least mixed squares. Especially, for in satisfy the condition in the problem statement.
Lastly, we consider the case . We show that is a multiple of if the number of the mixed squares is . Since the case is obvious, we assume that .
If all cells in a row and a column have the same color, the argument above shows that there exist at least mixed squares. By , this case is excluded. Hence, without loss of generality, we can assume that all the rows are mixed. In this case, for any , there exists exactly one such that is mixed. Therefore, for any , there exists exactly one such that and have different colors and is the same value for any . The shared value is denoted simply by . If and have different colors for some , and also have different colors and both and are mixed, which contradicts since . Therefore, since and have the same color for any , the number of the cells which have the same color as is and the number of the cells which have the same color as is , which shows that is a multiple of .
We assume that is a multiple of and . When the cell in the 1st to -th columns are colored black and the other cells are colored white, the number of mixed squares is . Therefore, in the case , the condition in the problem statement is satisfied if and only if is a multiple of .
From all the arguments above, the values which satisfy the condition in the problem statements are all and all multiples of in .
First, we consider the case . Let , be integers satisfying . We color cells black if , or , and color the other cells white. In this coloring, is mixed if and only if , or , , or , . Hence, the number of mixed squares is if , if . Therefore, does not satisfy the condition in the problem statement, while for , we can color the board such that there are exactly mixed squares.
Secondly, we consider the case . We show that there exist at least mixed squares in this case. In the case that all rows are mixed, there exists for any such that the colors of and are different, and is mixed for such . Hence, the number of mixed squares is at least . Similarly, this argument works also in the case all columns are mixed. Therefore, we only have to check the case when there exist a row and a column whose all cells have the same color. We show the following lemma.
Lemma. Let be positive integers. Each cell in a board is colored black or white. If all cells in the first row and the first column have the same color, and there are cells which have the other color, the number of mixed squares is at least .
Proof. Since the case is trivial, we assume that . When the number of mixed rows is and the number of mixed columns is , we show that there exist at least mixed squares. Since rows and columns are mixed if they have a cell whose color is different from that of the top left cell, holds. We only have to show it since by AM-GM inequality.
We create a graph whose vertices are mixed squares and the set of edges are defined as follows. (The terms of graph theory in the following are explained at the end of this answer.)
For each integer , if the -th row is mixed, we choose an integer such that and have different colors and connect and by an edge. Similarly, for each integer , if the -th column is mixed, we choose an integer such that and have different colors and connect and by an edge.
We show that has no cycle. Take any edge in . Without loss of generality, we can assume that this edge connects and for some and . By the definition of the set of edge of , none of the other edges connect a square located in the 1st to -th rows and a square located in the -th to -th rows, from which has no cycle.
has at least one vertex by . Since has no cycle, each connected component of is a tree, and the number of the vertices is bigger than that of the edges exactly by 1. Therefore, denoting the number of the vertices and the edges and the connected components of by , , respectively, we have . By the definition of the set of edges, holds and, combined with , we have , which is what we wanted to show. ■
We take such that all the cells in the -th row and -th column have the same color. We denote the number of cells with the other color in the 1st to -th rows, the 1st to -th columns by , in the 1st to -th rows, the -th to -th columns by , in the -th to -th rows, the 1st to -th columns by , in the -th to -th rows, the -th to -th columns by .
Denoting by , the number of mixed squares is at least by the lemma. We define for and . Then, is weakly monotonically increasing and for any . Also, since for any ,
equals to or , we have by and have
Therefore, there exist at least mixed squares. Especially, for in satisfy the condition in the problem statement.
Lastly, we consider the case . We show that is a multiple of if the number of the mixed squares is . Since the case is obvious, we assume that .
If all cells in a row and a column have the same color, the argument above shows that there exist at least mixed squares. By , this case is excluded. Hence, without loss of generality, we can assume that all the rows are mixed. In this case, for any , there exists exactly one such that is mixed. Therefore, for any , there exists exactly one such that and have different colors and is the same value for any . The shared value is denoted simply by . If and have different colors for some , and also have different colors and both and are mixed, which contradicts since . Therefore, since and have the same color for any , the number of the cells which have the same color as is and the number of the cells which have the same color as is , which shows that is a multiple of .
We assume that is a multiple of and . When the cell in the 1st to -th columns are colored black and the other cells are colored white, the number of mixed squares is . Therefore, in the case , the condition in the problem statement is satisfied if and only if is a multiple of .
From all the arguments above, the values which satisfy the condition in the problem statements are all and all multiples of in .
Final answer
All integers k with n^2 − n + 1 ≤ k ≤ n^2, and all multiples of 2n with n^2 + 1 ≤ k ≤ 2n^2.
Techniques
Coloring schemes, extremal argumentsEuler characteristic: V-E+FQM-AM-GM-HM / Power Mean