Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Randomly generating associative operations

In abstract algebra, the notion of a group is fairly fundamental. To get a group, we need a set of objects, and an binary operation with 3 properties (4 if you count closure). If we want to randomly generate a group given a finite set, (that is, randomly generate a table giving the result of every possible combination of elements in the set), then it's pretty easy to hack in an identity element, and hack in inverses, but it seems very hard to randomly generate an operation that is associative.

My question is whether there is some (efficient) way to randomly generate an associative operation. I've tried randomly generating an operation, then perturbing non-associative relationships so that they are associative one at a time, but this doesn't really seem to converge. Any ideas?

like image 218
deontologician Avatar asked Feb 22 '23 10:02

deontologician


2 Answers

This depends only on what is considered "random". One option is to, instead of generating the actual group operation matrix randomly, to pick randomly an associative group from a family of groups that are known to be associative by construction.

For example:

  • Group of integers {0...n-1} with addition modulo n is an associative group
  • Group of integers {1..p-1} with multiplication modulo n is an associative group when p is prime
  • If G and H and two associative groups, then the group (G,H) with group operation (g,h) * (g',h') = (g*g',h*h') is associative
  • if G is a group with group operation * and c is a constant in G, then also the operation @ defined as g @ g' = (g * c) * g' is associative as (g @ g') @ g'' = g * c * g' * c * g'' = g @ (g' @ g'')

So, for example, in order to generate a random group of size N, get a factorization of N into primes N = (p1, ..., pk) (same prime can appear multiple times in that list), then build random products q1, ..., qn from them so that N = q1 * ... * qn, and then for every qi, pick an additive or multiplicative integer group, add random constants, and then use the resulting product group as a random associative group. It won't generate all the associative groups with the same probabilities, but it is still a random process to get a random additive group, and might be much better than filling a matrix randomly especially if you need bigger groups.

like image 56
Antti Huima Avatar answered Mar 04 '23 23:03

Antti Huima


You could try Knuth-Bendix completion.

In essence this means that you force your group to be associative by repeatedly identifying the two sides of the associativity equation.

So your group will become smaller than your initial size, but you can again add some elements and continue.

like image 21
starblue Avatar answered Mar 05 '23 01:03

starblue