Maths Olympiad Prep

Library / /9 of 9

, 2019

Combinatorics Difficulty 7.9 National Olympiad, round 2 Prove it Japan

A 3×33 \times 3 grid made up of 99 1×11 \times 1 squares is given. Suppose you want to distribute 99 distinct positive integers chosen from the integers greater than or equal to 11 and less than or equal to 99 into 99 square boxes of the grid. How many distinct ways of distributing the 99 numbers are there if for any pair of boxes sharing a side the difference of the numbers inserted must be 33 or less? Even when the two configurations of the result of distribution coincide under a rotation or flipping over, regard the configurations distinct.

Solution

3232 ways

From the grid of 99 squares, we pick a 2×22 \times 2 four squares to fill in with numbers. Let as in the diagram (a) below aa, bb, cc, dd be the numbers inserted into the 44 squares. Then, we see that the difference between aa and dd is 55 or less. In fact, since both ab|a-b| and bd|b-d| are no more than 33, ad|a-d| must be less than or equal to 66. If ad=6|a-d| = 6, we must have b=a+d2b = \frac{a+d}{2}. For the same reason, we must have c=a+d2c = \frac{a+d}{2}, but this violates the requirement that the numbers written into the boxes must be distinct. Consequently, we must have ad5|a-d| \le 5.

In view of the facts obtained above, we see that if we insert a number less than or equal to 33 into the center square of the given 3×33 \times 3 grid, then the number 99 cannot be inserted anywhere. Also, if we insert any number greater than or equal to 77 into the center square, there will be no square to insert 11. Consequently, the number which can be inserted into the center square of the 3×33 \times 3 grid must be one of 44, 55, 66.

Let us first consider the case where 44 is the one to be inserted into the center square. Then 99 cannot be inserted into any of the squares sharing a side with the center square. So, 99 has to be inserted into one of the squares at four corners. By rotating the diagram, if necessary, we may insert 99 into the square located at the right lower corner. Then, we see that among the 44 squares located at the lower right corner, the remaining two empty squares must be filled by 66, 77. So, by considering the operation of flipping over, if necessary, we may conclude that we need to consider only the allocation of numbers shown in the diagram (b). If we then let e=8e = 8, then we see that 55 is the only number qualified to be chosen as ff.

and hh, so the choice of e=8e = 8 is inappropriate. Since the number at the center is 44, we see that ff, h8h \neq 8. And if g=8g = 8, then 55 becomes only number to go into both ii and hh, it is necessary to let i=8i = 8. Then, h=5h = 5 becomes the only possibility and g=3g = 3, e=2e = 2, f=1f = 1 will be determined uniquely in this order. Thus, we conclude that the method of allocation indicated in the diagram (c) is the only possibility. It is easy to check that this allocation of numbers does satisfy all the requirements of the problem.

Thus, we conclude that the methods of allocation with the center number 44 can be obtained by considering rotations and flipping over of the allocation (c), and therefore there are 88 ways to satisfy the conditions of the problem with the center number 44. Considering symmetry, we can also conclude that there are also 88 ways of allocating numbers to satisfy the conditions of the problem with the center number 66.

ab
cd
(a)
efg
h46
i79
(b)
213
546
879
(c)
1jk
l5m
no9
(d)
123
456
789
(e)
124
357
689
(f)

Next, we consider the case where 55 is the number to go into the center square. Then both 11 and 99 cannot be written into the squares sharing a side with the center square, and therefore, they have to be written into one of the four corner squares. By considering a rotation, if necessary, we may put 11 into the upper left corner square. If we put 99 into the upper-right or the lower-left corner square, then it becomes impossible to insert numbers into squares lying in between the squares occupied by 11 and 99, so the only possibility is to put 99 into the lower-right corner square.

Consequently, it is enough to consider which of the remaining numbers should be put into the squares jj, kk, ll, mm, nn, oo in the diagram (d). We note that the numbers that jj, ll can take have to be chosen from 22, 33, 44, and the numbers that mm, oo can take have to be chosen from 66, 77, 88. Consequently, one of kk, nn has to be assigned with a number, which is less than or equal to 44, and the other has to be assigned with a number greater than or equal to 66. So, we may assume, without loss of generality that kk is assigned with a number 44 or less, and nn is assigned with a number 66 or more.

Since the squares to which the numbers kk, ll are assigned share a side with square with numbers greater than or equal to 66, we conclude that j=2j = 2 is the only possibility, and similarly, we can conclude that o=8o = 8 is the only possibility. When k=3k = 3, l=4l = 4, m=6m = 6, n=7n = 7 are determined one by one in this order to obtain the result shown in (e). When k=4k = 4, l=3l = 3, n=6n = 6, m=7m = 7 are determined in this order to obtain the result shown in (f).

From each of these allocation of numbers (e) and (f), we can obtain 88 ways to get the allocation of numbers via rotation and flipping over. Therefore, there are 1616 ways of allocating numbers to satisfy the conditions of the problem with the center number 55. Thus, the desired answer for the problem is 16+16=3216 + 16 = 32.

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.