Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This is one of the descriptions I've seen online:

For any even $n$, say $n = 2m$, a row complete Latin square of order $n$ can be formed by writing down

$$0, 1, 2m - 1, 2, 2m - 2, 3,\ldots, m + 1, m$$

as the first row and then developing subsequent rows by adding $1$ modulo $n$.

I'm not quite clear on how that goes, such as what the difference is between $2m$ and $m$. $2m$ stands for $n$, does $m$ stand for modulo? I'd like to see and example with an even number or two, such as $4$, and $6$.

I tried, $2m = 4$

$$0, 1, 3, 2, 2\ldots$$ wait, that can't be right.

It should turn out with non repeating sequences, and non recurring pairs between rows. I can outline the other methods I've found (but don't understand) if this one is not the best.

share|improve this question

2 Answers 2

If I understand your description correctly, for $2m=4$: $$\begin{bmatrix} 0& 1& 3& 2\\ 1& 2& 0& 3\\ 2& 3& 1& 0\\ 3& 0& 2& 1\\ \end{bmatrix}$$

For $2m=6$: $$\begin{bmatrix} 0& 1& 5& 2& 4& 3\\ 1& 2& 0& 3& 5& 4\\ 2& 3& 1& 4& 0& 5\\ 3& 4& 2& 5& 1& 0\\ 4& 5& 3& 0& 2& 1\\ 5& 0& 4& 1& 3& 2 \end{bmatrix}$$

edit: In each case, the first row follows the pattern you gave; in subsequent rows, each number is one more than the number above it, but wrapping around at the size of the square (e.g. in the case where $n=2m=6$, after $5$ comes $0$).

Let's look at $n=2m=12$ $(m=6)$ a bit more closely. The pattern that you gave said: $$0, 1, 2m - 1, 2, 2m - 2, 3,\ldots, m + 1, m$$

So, the first row is: $$0, 1, 12 - 1, 2, 12 - 2, 3,\ldots, 6 + 1, 6$$

which is $$0, 1, 12-1=11, 2, 12-2=10, 3, 12-3=9, 4, 12-4=8, 5, 12-5=6+1=7, 6$$

Now, the second row is: $$0+1=1, 1+1=2, 11+1=12$$ becomes $$0, 2+1=3, 9+1=10, 4+1=5, 8+1=9, 5+1=6, 7+1=8, 6+1=7$$

Continuing gives: $$\begin{bmatrix} 0& 1& 11& 2& 10& 3& 9& 4& 8& 5& 7& 6\\ 1& 2& 0& 3& 11& 4& 10& 5& 9& 6& 8& 7\\ 2& 3& 1& 4& 0& 5& 11& 6& 10& 7& 9& 8\\ 3& 4& 2& 5& 1& 6& 0& 7& 11& 8& 10& 9\\ &&&&&\vdots \end{bmatrix}$$

share|improve this answer
    
It looks like a good result. An explanation of how it was calculated would be most helpful. –  op1 Oct 24 '10 at 21:58
    
@op1: I've edited to include more explanation. Please let me know if it isn't enough. –  Isaac Oct 24 '10 at 22:11

As I have essentially asked the same question somewhere else, I wanted to share the answer I was given there by Gage:

See here for more information [on row-complete Latin squares] http://personal.maths.surrey.ac.uk/st/H.Bruin/MMath/LatinSquares.html

The reference outlines a fairly straight forward algorithm and I wrote a a quick MATLAB script to build me an order-n square: https://gist.github.com/hcc23/274b76edc3dd82d5de1a

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.