Learn / Library / Combinatorics
Forced rectangle
Each cell of a grid with rows and columns is painted red or blue. A rectangle is monochromatic if its corner cells, taken from different rows and different columns, have the same color. What is the smallest such that every painting must contain a monochromatic rectangle?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Each column must contain cells of one color; label columns by which rows match and in what color.
Solution
- A column has cells and colors, so some cells of the column share a color.
- Label a column by a pair of its rows that match and their color; there are row pairs and colors, so labels.
- If columns get the same label, the corners form a monochromatic rectangle, so columns force a repeated label.
- With columns the labels can all differ, for example with the columns , , , , and , each having exactly one matching pair of cells, and no rectangle appears.
- Hence the smallest is .
Answer: