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,j≤ai,j+1a_{i,j} \le a_{i,j+1} and ai,j≤ai+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,…,2t−1s = 1, 2, \ldots, 2t - 1, there exist i≠ki \ne k and j≠ℓj \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.