Maths Olympiad Prep

Library / /21 of 26

Combinatorics Difficulty 7.1 National olympiad, round 2 Prove it Russia

Each cell of a square grid 100×100100 \times 100 contains a positive integer. A grid rectangle is called good if the sum of numbers in all its cells is divisible by 1717. By one move it is allowed to color all the cells of some good rectangle. It is not allowed to color a certain cell twice. Find the maximal dd such that for every arrangement of numbers, it is possible to color at least dd cells in some moves.

В каждой клетке квадрата 100×100100 \times 100 записано некоторое натуральное число. Прямоугольник, стороны которого идут по линиям сетки, назовем хорошим, если сумма чисел во всех его клетках делится на 1717. Разрешается одновременно закрашивать все клетки в некотором хорошем прямоугольнике. Одну клетку запрещается закрашивать дважды. При каком наибольшем dd можно закрасить хотя бы dd клеток при любом расположении чисел?

Solution

9744=10021629744 = 100^2 - 16^2 cells.

Lemma. Let a strip 1×k1 \times k be filled with positive integers. Then it is possible to color several non-overlapping good rectangles in it, covering at least k16k - 16 cells.

Proof. Induction on kk. For k16k \le 16 nothing needs to be colored. Suppose k17k \ge 17. Let the leftmost 1717 cells contain numbers a1,,a17a_1, \dots, a_{17}. Among the numbers 0,a1,a1+a2,,a1++a170, a_1, a_1 + a_2, \dots, a_1 + \dots + a_{17}, there are two with the same remainder modulo 1717. Then their difference, which has the form ai+ai+1++aja_i + a_{i+1} + \dots + a_j, is divisible by 1717. Remove the cells from ii to jj from the strip. The remaining cells form a strip of length k(ji+1)k - (j - i + 1). By the induction hypothesis, we can color several good rectangles so that at most 1616 cells remain uncolored. Then in the original strip, we can color the same cells, as well as the cells from ii to jj (they either form a new good rectangle or fall inside an old one). \square

Now to the problem. We show that it is possible to leave at most 162=25616^2 = 256 uncolored cells. Consider a strip 1×1001 \times 100, where the cells contain the sums of the numbers in the columns of the original square. Applying the lemma to it, we find several good rectangles. Then in the original square, we can color the corresponding rectangles of height 100100. After this, at most 1616 columns remain uncolored. Now apply the lemma to each of them separately; in each column, at most 1616 cells remain uncolored, i.e., at most 256256 cells in total.

It remains to give an example of an arrangement in which it is impossible to leave fewer than 256256 cells uncolored. Place ones in some 16×1616 \times 16 square, and zeros in all other cells. Consider any rectangle PP; if it contains a one, then it intersects the square in some rectangle a×ba \times b (1a,b161 \le a, b \le 16); but then the sum of all numbers in PP is abab, which cannot be divisible by 1717. Thus, no cell with a one will be colored, so at least 256256 cells remain uncolored.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.