We wrote the natural numbers from 1 to 9 in a table. We know that no matter how we select three numbers, none of which are in the same row or column, their sum is always 15. How many such tables are there?
Problem 881
Official solution
We denote the cells of the table with the initials as shown in Figure 1, and rearrange the cells as shown in Figure 2.
!
Figure 1
!
Figure 2
According to the proposed rearrangement, three cells have the property mentioned in the problem if and only if they are in the same row or column after the rearrangement. (This can be verified by checking all possible cases.) Therefore, the number of tables that can be created according to the requirements of the problem is exactly the number of ways to fill a table with the numbers from 1 to 9 such that the sum of the numbers in each row and column is 15. We will count these tables.
First, place the number 1 in the table. Since the only pairs of numbers from 1 to 9 that sum to 15 with 1 are 9 and 5, or 8 and 6, exactly these two pairs of numbers can be in the same row or column as 1. We can freely choose the position of 5 from the four available positions, and then 9 must be placed next to 1 and 5. The position of 6 can be freely chosen from the remaining two positions, and the position of 8 is then determined.
So far, we have ways to start filling the table. We will show that each of these can be completed uniquely. Four positions remain, and we need to place the numbers 2, 3, 4, and 7. Among these, the numbers 5, 6, 8, and 9 are completed to 15 by 3+7, 2+7, 3+4, and 2+4, respectively. Therefore, each of the remaining numbers appears in exactly two decompositions. Thus, the common element of the rows and columns of 5 and 6 can only be 7, the common element of the rows and columns of 5 and 8 can only be 3, the common element of the rows and columns of 9 and 6 can only be 2, and the common element of the rows and columns of 9 and 8 can only be 4. Since the numbers 5, 6, 8, and 9 are thus completed to 15 by the numbers next to them, all the resulting tables are valid.
Therefore, there are 72 valid tables in total.
Remark. It is easy to see that the table
(Figure 3) has the desired property.
!
Figure 3
It is also clear that if we change the order of the rows and columns, or swap the roles of the rows and columns, we get additional valid tables. Since this gives us tables, our solution accounts for all possible tables. However, those who chose this path still needed to show that no further possibilities exist.