IMC 2024 · Problem 9

Day 231st IMC · Blagoevgrad, Bulgaria

Statement

A matrix A=(aij)A = (a_{ij}) is called nice, if it has the following properties:

(i) the set of all entries of AA is {1,2,,2t}\{1, 2, \ldots, 2t\} for some integer tt;

(ii) the entries are non-decreasing in every row and in every column: ai,jai,j+1a_{i,j} \le a_{i,j+1} and ai,jai+1,ja_{i,j} \le a_{i+1,j};

(iii) equal entries can appear only in the same row or the same column: if ai,j=ak,a_{i,j} = a_{k,\ell}, then either i=ki = k or j=j = \ell;

(iv) for each s=1,2,,2t1s = 1, 2, \ldots, 2t - 1, there exist iki \ne k and jj \ne \ell such that ai,j=sa_{i,j} = s and ak,=s+1a_{k,\ell} = s + 1.

Prove that for any positive integers mm and nn, the number of nice m×nm \times n matrices is even.

For example, the only two nice 2×32 \times 3 matrices are (111222)\begin{pmatrix} 1 & 1 & 1 \\ 2 & 2 & 2 \end{pmatrix} and (113244)\begin{pmatrix} 1 & 1 & 3 \\ 2 & 4 & 4 \end{pmatrix}.

Official solution

Hidden so you can work on the problem first.

Proposed by Fedor Petrov, St Petersburg State University.