Maths Olympiad Prep

Library / /4 of 7

Combinatorics Difficulty 5.0 AIME, harder Prove it Hong Kong

There is a 20×2020 \times 20 table and 400400 cards printed with the numbers 11 to 400400. The cards are then distributed to the cells of the table so that there is one card in each cell. After that, we put a red sticker on the card in each row with the largest number, and a blue sticker on the card in each column with the largest number. Let AA denote the smallest number on the 2020 cards with red stickers, and BB denote the smallest number on the 2020 cards with blue stickers. How many different possible values of AB|A - B| are there?

Solution

Answer: 362362

For convenience we shall use the term 'red number' to the number on a card with a red sticker, and similarly for 'blue number'. Clearly, a red number, being a row maximum, is at least 2020. Also, since AA is the smallest red number, there are 1919 other red numbers greater than AA, so AA is at most 381381. The same is true for BB. That is, both AA and BB are between 2020 and 381381 (inclusive), and so AB|A - B| is at most 361361.

We shall prove that all these 362362 possibilities (from 00 to 361361) for AB|A - B| are attainable. Indeed, we can make A=381A = 381 and BB can be equal to any value between 2020 and 381381. To make A=B=381A = B = 381 we can use the following configuration (the arrangements of the starred entries are unimportant):

381**...*
*382*...*
**383...*
...............
***...400

On the other hand for any B{20,21,...,380}B \in \{20, 21, ..., 380\}, we can use the following configuration to obtain such value of BB while having A=381A = 381:
1**...*381
2382*...**
3*383...**
..................
19**...399*
B**...*400

It follows that the answer is 362362.

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