On investigations regarding latin squares and variations.
More...
Go to the source code of this file.
Detailed Description
On investigations regarding latin squares and variations.
 Todo:
 Strictly pandiagonal latin squares
 Todo:
 Counting the number of njective relations

Let mj_n(m) be the number of njective relations on a set with m elements ("mj" like "multijection").

See (currently) "Module ComputerAlgebra/Sets" in ComputerAlgebra/plans/general.hpp.

So mj_0(m) = 2, mj_1(m) = m and mj_2(m) = m!, while mj_3(m) is the (total) number of latin squares (quasigroups) of order n.

Conjecture: mj_k(3) = 3 * 2^(k1) for k >= 1 (verified for k <= 5).

The formula works also for k=0 if ceil is used.

Alternatively, one can use recursion a(n) = 2 * a(n1) with initial values a(0) = 2 and a(1) = 3.

This sequence is 2,3,6,12,24,48, ...

Identical with A042950.

mj_k(4) : 2,4,24,576 (k=0,1,2,3)

eis_search yields ["A000336","A071302"].

A000336 is the function f: NN > NN, f(n) = n for n <= 4, while f(n) = f(n1) * f(n2) * f(n3) * f(n4) for n >= 5.

This yields 1, 2, 3, 4, 24, 576, 165888.

A071302 is 1/2 * (number of square matrices M of order n over ZZ_3 such that M * M^t = Id).

This yields 1, 4, 24, 576, 51840.

The function allnjective_rel(M,n) won't be able to compute the next term allnjective_rel(setn(4),4), since the number of injections is roughly 109 * 10^12.

But with a C++ implementation, which runs through the injections one by one, we can compute it.
 Todo:
 Isomorphismen

We should investigate the isotopism classes of the set of njective relations, that is, for kary relations we allow k bijections (for each place one.

We should also investigate parastrophisms, that is, the k! permutations of the places of the relations.

And, of course, also ordinary isomorphisms, that is, having the k isotopismbijections all equal.
Definition in file general.hpp.