Let $m$ and $n$ be positive integers. Find the smallest positive integer $s$ for which there exists an $m \times n$ rectangular array of positive integers such that:
- Each row contains $n$ distinct consecutive integers in some order,
- Each columm contains $m$ distinct consecutive integers in some order,
- Each entry is less than or equal to $s$
For example, $$\begin{bmatrix} 1 & 2 & 4 & 3\\ 2 & 1 & 3 & 4 \end{bmatrix} $$ is a legal (and in fact minimal in terms of $s$) solution when $m = 2, n=4$.
I can show that if $m=n$ then the answer is $m$. But can someone help me with the other cases?
I think there may be a point of confusion over the word 'consecutive'. I believe it is a universal understanding that it means each successive integer is one more than the preceding one, i.e that the values are $N, N+1, N+2, ..., N+K$ for some $N, K.$ In that case, assuming the (say) upper-left corner of the matrix is $1$, then the value of $s$ is $(m + n - 1)$. Example for $m=3$, $n=4$:
If you mean something else, please clarify.