Maths Olympiad Prep

Library / /52 of 115

Combinatorics Difficulty 7.2 National olympiad, round 2 Find the answer

Let n3n\geq3 be an integer. We say that an arrangement of the numbers 11 , 22 , \dots , n2n^2 in a n×nn \times n table is row-valid if the numbers in each row can be permuted to form an arithmetic progression, and column-valid if the numbers in each column can be permuted to form an arithmetic progression. For what values of nn is it possible to transform any row-valid arrangement into a column-valid arrangement by permuting the numbers in each row?

A number or a short expression. Spacing and $ signs are ignored.

Solution

The answer is all prime n\boxed{\text{prime } n} .
Proof that primes work
Suppose n=pn=p is prime. Then, let the arithmetic progressions in the ii th row have least term aia_i and common difference did_i . For each cell with integer kk , assign a monomial xkx^k . The sum of the monomials is x(1+x++xn21)=i=1nxai(1+xdi++x(n1)di),x(1+x+\ldots+x^{n^2-1}) = \sum_{i=1}^n x^{a_i}(1+x^{d_i}+\ldots+x^{(n-1)d_i}), where the LHS is obtained by summing over all cells and the RHS is obtained by summing over all rows. Let SS be the set of pp th roots of unity that are not 11 ; then, the LHS of the above equivalence vanishes over SS and the RHS is pdixai.\sum_{p \mid d_i} x^{a_i}. Reducing the exponents (mod pp ) in the above expression yields f(x) :=pdixai(modp)=0f(x) := \sum_{p \mid d_i} x^{a_i \pmod{p}} = 0 when xSx \in S . Note that sS(xs)=1+x++xp1\prod_{s \in S} (x-s)=1+x+\ldots+x^{p-1} is a factor of f(x)f(x) , and as ff has degree less than pp , ff is either identically 0 or f(x)=1+x++xp1f(x)=1+x+\ldots+x^{p-1} .
- If ff is identically 0, then pp never divides did_i . Thus, no two elements in each row are congruent (modp)\pmod{p} , so all residues are represented in each row. Now we can rearrange the grid so that column ii consists of all numbers i(modp)i \pmod{p} , which works.
- If f(x)=1+x++xp1f(x)=1+x+\ldots+x^{p-1} , then pp always divides did_i . It is clear that each did_i must be pp , so each row represents a single residue (modp)\pmod{p} . Thus, we can rearrange the grid so that column ii contains all consecutive numbers from 1+(i1)p1 + (i-1)p to ipip , which works.
All in all, any prime nn satisfies the hypotheses of the problem.
Proof that composites do not work
Let n=abn=ab . Look at the term a2b+aba^2b+ab ; we claim it cannot be part of a column that has cells forming an arithmetic sequence after any appropriate rearranging. After such a rearrangement, if the column it is in has common difference d<ab=nd<ab=n , then a2b+abda^2b+ab-d must also be in its column, which is impossible. If the column has difference d>ab=nd > ab = n , then no element in the next row can be in its column. If the common difference is d=ab=nd = ab = n , then a2b+ab2d=a2baba^2b + ab - 2d = a^2b - ab and a2b+abd=a2ba^2b + ab - d = a^2b , which are both in the row above it, must both be in the same column, which is impossible. Therefore, the grid is not column-valid after any rearrangement, which completes the proof.
~ Leo.Euler

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.