Maths Olympiad Prep

Library / Estonian Math Competitions /91 of 148

Estonian Math Competitions

Combinatorics Difficulty 6.0 AIME, harder Prove it Estonia

A field is a 2020×20212020 \times 2021 grid with a positive integer written into each cell, such that no number repeats in any row or column. An onion consists of 44 consecutive cells in a row or column, whose numbers add up to exactly 4⋅20214 \cdot 2021. Find the largest possible number of onions on the field.

Solution

Answer: 1009⋅40411009 \cdot 4041.

In a column of length 20202020 there are 20172017 potential onions. However there cannot be two consecutive onions, as they share 33 cells, meaning their fourth numbers would have to be equal. So a column can have at most 10091009 onions. Analogously a row of length 20212021 can also have at most 10091009 onions. As there are 2020+2021=40412020 + 2021 = 4041 rows and columns in total, there can be at most 1009⋅40411009 \cdot 4041 onions.

We will show there exists a field with 1009⋅40411009 \cdot 4041 onions. We will first construct a 2020×20202020 \times 2020 grid, choosing the first two rows to be

1, -1, 2, -2, 3, -3, ..., 1009, -1009, 1010, -1010,
-1, 1, -2, 2, -3, 3, ..., -1009, 1009, -1010, 1010.

The next two rows will be shifted the cells to the left:

2, -2, 3, -3, ..., 1009, -1009, 1010, -1010, 1, -1,
-2, 2, -3, 3, ..., -1009, 1009, -1010, 1010, -1, 1.

Similarly we construct the other rows. Finally we add the rightmost column consisting of the numbers
1011,−1011,1012,−1012,…,2019,−2019,2020,−20201011, -1011, 1012, -1012, \dots, 2019, -2019, 2020, -2020.

We obtain the desired field by adding 2⋅20212 \cdot 2021 to all negative numbers in the grid.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.