MOLS {crossdes} | R Documentation |
The function constructs sets of mutually othogonal latin squares (MOLS) using Galois fields. The construction works for prime powers only.
MOLS(p, n, primpol = GF(p, n)[[2]][1, ])
p |
A prime number less than 100. |
n |
A positive integer. |
primpol |
A primitive polynomial of the Galois Field GF( |
If trt = p^n
is a prime power, then trt
-1 latin squares of order trt
are constructed.
The elements of the squares are numbered 1,...,trt
.
These squares are mutually orthogonal, i.e. if any two of them are superimposed, the resulting
array will contain each ordered pair (i,j)
, i
,j
in {1,...,
trt
} exactly once.
The squares are in standard order, i.e. the first row is always equal to (1,...,trt
).
A primitive polynomial may be constructed automatically using the internal function GF
.
For trt = p^n
, an array that contains trt
-1 latin squares is returned.
Oliver Sailer
Cherowitzo, W.: http://www-math.cudenver.edu/~wcherowi/courses/finflds.html
Street, A.P. and Street, D.J. (1987): Combinatorics of experimental design. Oxford University Press, Oxford.
MOLS(7,1) # 6 mutually orthogonal latin squares of order 7
MOLS(2,3) # 7 mutually orthogonal latin squares of order 8