# MOLS: Construction of Complete Sets of Mutually Orthogonal Latin... In crossdes: Construction of Crossover Designs

## Description

The function constructs sets of mutually othogonal latin squares (MOLS) using Galois fields. The construction works for prime powers only.

## Usage

 `1` ```MOLS(p, n, primpol = GF(p, n)[[2]][1, ]) ```

## Arguments

 `p` A prime number less than 100. `n` A positive integer. `primpol` A primitive polynomial of the Galois Field GF(p^n).

## Details

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`.

## Value

For trt = p^n, an array that contains trt-1 latin squares is returned.

Oliver Sailer

## References

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.

`des.MOLS`

## Examples

 ```1 2``` ```MOLS(7,1) # 6 mutually orthogonal latin squares of order 7 MOLS(2,3) # 7 mutually orthogonal latin squares of order 8 ```

### Example output

```Loading required package: AlgDesign
, , 1

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]    1    2    3    4    5    6    7
[2,]    2    3    4    5    6    7    1
[3,]    3    4    5    6    7    1    2
[4,]    4    5    6    7    1    2    3
[5,]    5    6    7    1    2    3    4
[6,]    6    7    1    2    3    4    5
[7,]    7    1    2    3    4    5    6

, , 2

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]    1    2    3    4    5    6    7
[2,]    3    4    5    6    7    1    2
[3,]    5    6    7    1    2    3    4
[4,]    7    1    2    3    4    5    6
[5,]    2    3    4    5    6    7    1
[6,]    4    5    6    7    1    2    3
[7,]    6    7    1    2    3    4    5

, , 3

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]    1    2    3    4    5    6    7
[2,]    4    5    6    7    1    2    3
[3,]    7    1    2    3    4    5    6
[4,]    3    4    5    6    7    1    2
[5,]    6    7    1    2    3    4    5
[6,]    2    3    4    5    6    7    1
[7,]    5    6    7    1    2    3    4

, , 4

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]    1    2    3    4    5    6    7
[2,]    5    6    7    1    2    3    4
[3,]    2    3    4    5    6    7    1
[4,]    6    7    1    2    3    4    5
[5,]    3    4    5    6    7    1    2
[6,]    7    1    2    3    4    5    6
[7,]    4    5    6    7    1    2    3

, , 5

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]    1    2    3    4    5    6    7
[2,]    6    7    1    2    3    4    5
[3,]    4    5    6    7    1    2    3
[4,]    2    3    4    5    6    7    1
[5,]    7    1    2    3    4    5    6
[6,]    5    6    7    1    2    3    4
[7,]    3    4    5    6    7    1    2

, , 6

[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]    1    2    3    4    5    6    7
[2,]    7    1    2    3    4    5    6
[3,]    6    7    1    2    3    4    5
[4,]    5    6    7    1    2    3    4
[5,]    4    5    6    7    1    2    3
[6,]    3    4    5    6    7    1    2
[7,]    2    3    4    5    6    7    1

, , 1

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    1    2    3    4    5    6    7    8
[2,]    2    1    4    3    6    5    8    7
[3,]    3    4    1    2    7    8    5    6
[4,]    4    3    2    1    8    7    6    5
[5,]    5    6    7    8    1    2    3    4
[6,]    6    5    8    7    2    1    4    3
[7,]    7    8    5    6    3    4    1    2
[8,]    8    7    6    5    4    3    2    1

, , 2

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    1    2    3    4    5    6    7    8
[2,]    3    4    1    2    7    8    5    6
[3,]    5    6    7    8    1    2    3    4
[4,]    7    8    5    6    3    4    1    2
[5,]    4    3    2    1    8    7    6    5
[6,]    2    1    4    3    6    5    8    7
[7,]    8    7    6    5    4    3    2    1
[8,]    6    5    8    7    2    1    4    3

, , 3

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    1    2    3    4    5    6    7    8
[2,]    4    3    2    1    8    7    6    5
[3,]    7    8    5    6    3    4    1    2
[4,]    6    5    8    7    2    1    4    3
[5,]    8    7    6    5    4    3    2    1
[6,]    5    6    7    8    1    2    3    4
[7,]    2    1    4    3    6    5    8    7
[8,]    3    4    1    2    7    8    5    6

, , 4

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    1    2    3    4    5    6    7    8
[2,]    5    6    7    8    1    2    3    4
[3,]    4    3    2    1    8    7    6    5
[4,]    8    7    6    5    4    3    2    1
[5,]    7    8    5    6    3    4    1    2
[6,]    3    4    1    2    7    8    5    6
[7,]    6    5    8    7    2    1    4    3
[8,]    2    1    4    3    6    5    8    7

, , 5

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    1    2    3    4    5    6    7    8
[2,]    6    5    8    7    2    1    4    3
[3,]    2    1    4    3    6    5    8    7
[4,]    5    6    7    8    1    2    3    4
[5,]    3    4    1    2    7    8    5    6
[6,]    8    7    6    5    4    3    2    1
[7,]    4    3    2    1    8    7    6    5
[8,]    7    8    5    6    3    4    1    2

, , 6

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    1    2    3    4    5    6    7    8
[2,]    7    8    5    6    3    4    1    2
[3,]    8    7    6    5    4    3    2    1
[4,]    2    1    4    3    6    5    8    7
[5,]    6    5    8    7    2    1    4    3
[6,]    4    3    2    1    8    7    6    5
[7,]    3    4    1    2    7    8    5    6
[8,]    5    6    7    8    1    2    3    4

, , 7

[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,]    1    2    3    4    5    6    7    8
[2,]    8    7    6    5    4    3    2    1
[3,]    6    5    8    7    2    1    4    3
[4,]    3    4    1    2    7    8    5    6
[5,]    2    1    4    3    6    5    8    7
[6,]    7    8    5    6    3    4    1    2
[7,]    5    6    7    8    1    2    3    4
[8,]    4    3    2    1    8    7    6    5
```

crossdes documentation built on May 30, 2017, 4:14 a.m.