A grid with m rows and n columns has each cell colored either white or black in such a way as to satisfy the following two conditions:
a. each row contains as many white cells as black cells;
b. if a row meets a column in a black cell, then that row and that column have the same number of black cells; likewise, if a row intersects a column in a white cell, then that row and that column have the same number of white cells.
Find all possible pairs (m,n) for which such a coloring can exist.
Solution
Solution:
From the first condition we have that the number of columns is necessarily even. In general, the rows, of length 2a, have a white cells and a black cells. For every row there will be at least one column that intersects it in a white cell and at least one that intersects it in a black cell. Let us consider the one that intersects it in a white cell. It has exactly a white cells. Hence one possible solution is given by the pairs (a,2a), in which half of the columns are entirely white and half entirely black. A possible realization of such a solution is a board in which the first a columns are white and the following a are black.
If instead they are not monochromatic, this means that there exists at least one black cell, but then in that cell the column intersects a row with a black cells, so the column too must have a black cells in addition to the a white cells. The second family of possible solutions is therefore given by the pairs (2a,2a). A possible realization in this case is a board colored in the canonical way.
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 translated into English from it; metadata (topic, difficulty) added by this project.