Maths Olympiad Prep

Library / /34 of 38

Algebra Difficulty 7.6 National olympiad, round 2 Prove it China

Given a prime number pp, let AA be a p×pp \times p matrix such that its entries are exactly 1,2,,p21, 2, \dots, p^2 in some order. The following operation is allowed for a matrix: add one to each number in a row or a column, or subtract one from each number in a row or a column. The matrix AA is called “good” if one can take a finite series of such operations resulting in a matrix with all entries zero. Find the number of good matrices AA.

Solution

We may combine the operations on the same row or column, thus the final result of a series of operations can be realized as subtracting integer xix_i from each number of ii-th row and subtracting integer yjy_j from each number of jj-th column. Thus, the matrix AA is good if and only if there exist integers xi,yjx_i, y_j, such that aij=xi+yja_{ij} = x_i + y_j for all 1i,jp1 \le i, j \le p.

Since the entries of AA are distinct, x1,x2,,xpx_1, x_2, \dots, x_p are pairwise distinct, and so are y1,y2,,ypy_1, y_2, \dots, y_p. We may consider only the case that x1<x2<<xpx_1 < x_2 < \cdots < x_p since swapping the value of xix_i and xjx_j results in swapping the ii-th row and jj-th row, which is again a good matrix. Similarly, we may consider only the case that y1<y2<<ypy_1 < y_2 < \cdots < y_p, thus the matrix is increasing from left to right, also from top to bottom.

From the assumptions above, we have a11=1a_{11} = 1, a12a_{12} or a21a_{21} equals 22. We may consider only the case that a12=2a_{12} = 2 since the transpose of the matrix is again good. Now we argue by contradiction that the first row is 1,2,,p1, 2, \dots, p. Assume on the contrary that 1,2,,k1, 2, \dots, k is on the first row, but k+1k+1 is not, 2k<p2 \le k < p, therefore a21=k+1a_{21} = k+1. We call kk consecutive integers a “block”, and we shall prove that the first row consists of several blocks, that is, the first kk numbers is a block, the next kk numbers is again a block, and so on.

If it is not so, assume the first nn groups of kk numbers are “blocks”, but the next kk numbers is not a “block” (or there are no kk numbers remaining). It follows that for j=1,2,,nj = 1, 2, \dots, n,

y(j1)k+1,y(j1)k+2,,yjky_{(j-1)k+1}, y_{(j-1)k+2}, \dots, y_{jk} is a "block", the first nknk columns of the matrix can be divided into pn×kpn \times k submatrices ai,(j1)k+1,ai,(j1)k+2,,ai,jka_{i, (j-1)k+1}, a_{i, (j-1)k+2}, \dots, a_{i, jk}, i=1,2,,pi = 1, 2, \dots, p, j=1,2,,nj = 1, 2, \dots, n, each submatrix is a "block". Now assume a1,nk+1=aa_{1, nk+1} = a, let bb be the smallest positive integer such that a+ba+b is not on the first row, then bk1b \le k-1. Since a2,nk+1a1,nk+1=x2x1=a21a11=ka_{2, nk+1} - a_{1, nk+1} = x_2 - x_1 = a_{21} - a_{11} = k, we have a2,nk+1=a+ka_{2, nk+1} = a+k, therefore a+ba+b lies in the first nknk columns. Therefore, a+ba+b is contained in one of the 1×k1 \times k submatrices mentioned above, which is a "block", however a,a+ka, a+k are not in this "block", which is a contradiction.

We showed that the first row is formed by blocks, in particular kpk \mid p, however, 1<k<p1 < k < p, and pp is a prime, which is impossible. So we conclude that the first row is 1,2,,p1, 2, \dots, p, the kk-th row must be (k1)p+1,(k1)p+2,,kp(k-1)p+1, (k-1)p+2, \dots, kp. Thus up to interchanging rows, columns and transpose, the good matrix is unique, the answer is therefore 2(p!)22(p!)^2.

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 and solution reproduced as published; topic and difficulty added by this site.