In each of the cells of an table is written one of the letters , , or . The corresponding letter in every two rows, respectively every two columns of the table, coincide in at most positions. Determine , and , if
, 2022
Solution
Denote the table rows by . Let , be the number of positions, in which the rows and differ. According to the statement . Then:
Consider an arbitrary table column and let it contain letters , letters , and letters , with . The contribution to of this column is exactly , and due to the inequality
it follows that every column adds at most to the value of (this is the case iff divides and every column there are exactly letters of each type). Now (1) gives rise to:
Repeating the arguments, when replacing rows and columns leads to:
We add (2) and (3) to obtain . Therefore, , , and (meaning also that both and are divisible by ). From , it follows that either or . For , , which is impossible, since divides and , thus divides the RHS but not the LHS. For , , with discriminant a perfect square. From we deduce that the difference between two perfect squares is , which holds
true only for and . In conclusion and the table is:
| a | b | c |
|---|---|---|
| b | c | a |
| c | a | b |