# [2019.08.03] Multiplication Cubes

Today I thought about my pet project related to finite semigroups for
a while. Not coincidentally my thoughts can now be expressed only
with LaTeX, so let it be here. A finite groupoid is a set of $n$
elements which we will denote as $g_i$ with $i$ ranging from $0$ to
$n-1$. A multiplication table of a finite groupoid is a table $a$
with values $a_{ij}$ in its cells where $a_{ij}=g_i\cdot g_j$. We can
now define a multiplication cube with values $p_{ijk}$ in its cells
which are the probabilities of respective equalities hold in a given
groupoid, i.e. $p_{ijk}=P\left\{g_i = g_j\cdot g_k\right\}$. It's
easy to see that $p_{ijk}\in\left[0,1\right]$ and
$\sum\limits_{i=0}^{n-1}p_{ijk}=1$. One also can measure some kind of
divergence between two multipoication cubes $p'$ and $p''$, namely as
$-\sum\limits_{jk}\sum\limits_i
p'_{ijk}\log\frac{p'_{ijk}}{p''_{ijk}}$. This divergence is a
straightforward generalization of the Kullback-Leibler divergence
commonly used to compare probability distributions. Simple
multiplication table is a special case of a multiplication cube when
we have $p_{ijk}\in\left\{0,1\right\}$. Then there is only $n^2$ ones
in a cube, representing $n^2$ cells of the flat multiplication table.
These objects can be helpful when applying machine learning to
semigroups multiplication.