Cyclic Shift of Latin Squares

combinatoricslatin-square

I'm trying to solve this following problem on Latin squares:

"Suppose that the first row of an $n \times n$ array is
\begin{align*}
x_1 \ \ x_2 \ \ x_3 \ldots x_{n-1} \ \ x_n,
\end{align*}
and suppose also that each successive row is obtained from the previous one by a cyclic shift of $r$ places, so that the second row is
\begin{align*}
x_{r+1} \ \ x_{r+2} \ \ x_{r+3} \ldots x_{r-1} \ \ x_r,
\end{align*}
and so on. If $n$ is given, for which values of $r$ does this construction yield a Latin square?"

I'm having trouble, first, seeing what exactly the text means by a cyclic shift. This seems to imply that the first row, in being shifted $r$ places, would become $x_r$, $x_{r+2}$, etc. and we add $1$ successively as we move down the array. From here, I can't quite figure out how to construct the value of $r$, I assume in terms of $n$, unless we were to trivially conclude that $n = r$. But this doesn't involve using the definition of a Latin square.

I'd appreciate any insights on this problem.

Best Answer

All rows have distinct entries by the construction. For columns, if $\gcd(n,r)>1$ there will be a row before the bottom that is identical to the first, which is not allowed. Thus, the condition for $n$ and $r$ to generate a Latin square is $\gcd(n,r)=1$.

Related Question