Question 6 Let $m$ be an integer greater than 1, $n$ be an odd number, and $3 \leqslant n<2 m$. The numbers $a_{i, j}(i, j \in \mathbf{N}, 1 \leqslant i \leqslant m, 1 \leqslant j \leqslant n)$ satisfy:
(1) For any $1 \leqslant j \leqslant n, a_{1, j}, a_{2, j}, \cdots, a_{m, j}$ is a permutation of $1,2, \cdots, m$.
(2) For any $1 \leqslant i \leqslant m, 1 \leqslant j \leqslant n-1$, we have $\left|a_{i, j}-a_{i, j+1}\right| \leqslant 1$.
Find the minimum value of $M=\max _{1 \leqslant i \leqslant m} \sum_{j=1}^{n} a_{i, j}$.
Let's analyze and solve the problem. Set $n=2k+1(k \geqslant 1)$. Without loss of generality, assume that the $m$ in the $(k+1)$-th column is in the 1st row.
If $a_{1, k}=m$, then by condition (1) we have
\[
\begin{array}{l}
a_{1, k-1} \geqslant m-1, a_{1, k-2} \geqslant m-2, \cdots \cdots \\
a_{1,1} \geqslant m-(k-1), \\
a_{1, k+2} \geqslant m-1, a_{1, k+3} \geqslant m-2, \cdots \cdots \\
a_{1, n} \geqslant m-k, \\
\sum_{j=1}^{n} a_{1, j} \geqslant m n-[1+2+\cdots+(k-1)+ \\
\quad 1+2+\cdots+k] \\
=m n-[1+3+5+\cdots+(2 k-1)] \\
=m n-k^{2} .
\end{array}
\]

If $a_{1, k+2}=m$, we similarly get equation (1).
If $a_{1, k}$ and $a_{1, k+2}$ are not $m$, then let the $m$ in the $k$-th and $(k+2)$-th columns be in the $i$-th and $t$-th rows, respectively. In this case,
\[
a_{i, k+1}=m-1, a_{t, k+1}=m-1.
\]

But there is only one $m-1$ in the $(k+1)$-th column, so $i=t$.
With the same reasoning as above, we have
\[
\begin{array}{l}
a_{i, k-1} \geqslant m-1, a_{i, k-2} \geqslant m-2, \cdots \cdots \\
a_{i, 1} \geqslant m-(k-1), \\
a_{i, k+3} \geqslant m-1, a_{i, k+4} \geqslant m-2, \cdots \cdots \\
a_{i, n} \geqslant m-k+1 .
\end{array}
\]

Compared to equation (1), it is clear that
\[
\sum_{j=1}^{m} a_{i, j} > m n - k^{2}.
\]
Therefore, we get
\[
M \geqslant m n - k^{2}.
\]
The difficulty lies in constructing an instance where the equality in equation (2) holds.
Next, we use $b_{i, j} = m - a_{i, j}$ to replace $a_{i, j}$.
At this point, in the $m \times n$ table $\left(b_{i j}\right)_{1 \leq i < m, 1 < j < n}$, each column is a permutation of $0,1, \cdots, m-1$, and the difference between adjacent numbers in each row does not exceed 1.
Next, we need to prove: the minimum value of the row sum can be $k^{2}$. The case for $k=1$ is not difficult (see the table in Figure 2).
\[
\begin{tabular}{ccc}
$m-1$ & $m-1$ & $m-1$ \\
& $\cdots \cdots$ & \\
3 & 3 & 3 \\
2 & 2 & 2 \\
1 & 0 & 0 \\
0 & 1 & 1 \\
& Figure 2 &
\end{tabular}
\]
The case for $k=2$ is also not difficult (see the table in Figure 3).
\[
\begin{tabular}{ccccc}
$m-1$ & $m-1$ & $m-1$ & $m-1$ & $m-1$ \\
& & $\cdots \cdots$ & & \\
4 & 4 & 4 & 4 & 4 \\
3 & 3 & 3 & 3 & 3 \\
2 & 1 & 0 & 0 & 1 \\
0 & 0 & 1 & 2 & 2 \\
1 & 2 & 2 & 1 & 0 \\
& & Figure 3 & &
\end{tabular}
\]

Thus, we hope to construct a $(k+1) \times (2k+1)$ table, where each column is a permutation of $0,1, \cdots, k$, the difference between adjacent numbers in each row does not exceed 1, and the minimum value of the row sum is $k^{2}$. Then, add $m-(k+1)$ rows above this table, with each row having the same numbers, which are $k+1, k+2, \cdots, m-1$, to get the $m \times n$ table.

Next, we construct the required $(k+1) \times (2k+1)$ table.

First, construct a $(k+1) \times (2k+2)$ table, where the 1st row is sequentially $k, k-1, \cdots, 0,0,1, \cdots, k$. Then, for each $i(i=1,2, \cdots, k)$ and $j(j=3, 4, \cdots, 2k+2)$, place the number in the $i$-th row and $j$-th column in the $(i+1)$-th row and $(j-2)$-th column, and place the numbers in the 1st and 2nd columns in the next row in the $(2k+1)$-th and $(2k+2)$-th columns. Complete the table in Figure 4 (using $k=5$ as an example).
\[
\begin{array}{l}
543210012345 \\
321001234554 \\
10012345543 \\
012345543210 \\
234554321001 \\
455432100123 \\
\text{Figure 4} \\
\end{array}
\]

Then, remove the last row from the table in Figure 4 to get the required $(k+1) \times (2k+1)$ table.
Clearly, the table in Figure 4 satisfies properties (1) and (2), and the sum of the numbers in each row is $k^{2}+k$. Thus, the sums of the rows in the constructed table are all different, forming the set $\left\{k^{2}, k^{2}+1, \cdots, k^{2}+k\right\}$, where the sum of the 1st row is $k^{2}$.