A semigroup is a set, e.g. $X$, with an associative binary operation, e.g. $\star$. That is for all $x,y,z \in X$, $(x \star y) \star z = x \star (y \star z)$.
I have seen some abstract algebraic books, but there are no examples for a non-numerical set. In other words, let $X = \{ a,b,c,d,e,f \}$. If we represent $\star$ by a table as follow
* a b c d e f
----------------------------
a | . | . | . | . | . | . |
b | . | . | . | . | . | . |
c | . | . | . | . | . | . |
d | . | . | . | . | . | . |
e | . | . | . | . | . | . |
f | . | . | . | . | . | . |
----------------------------
then what should I put in the table above instead of dots? In other words, what this matrix like representation should look like?
I am new to abstract algebra with a CS background.
Here's one way:
and as it says in one of the comments there are 15972 other semigroups with 6 elements (up to isomorphism and anti-isomorphism.
You said:
One answer is the obvious one: the multiplication defined by the table has to be associative.
Another answer might be: there is a result in this paper stating that almost all semigroups of order $n$ are 3-nilpotent, where almost all means that the proportion of semigroups with this property tends to $1$ as the order tends to infinity.
A semigroup $S$ is 3-nilpotent if there exists an element $0\in S$ such that $xyz=0$ for all $x,y,z\in S$.
One reason there are so many semigroups with this property is that their multiplication tables are very easy to define:
The object with multiplication defined by this construction is always a semigroup, since the product of any 3 elements, written $x(yz)$ or $(xy)z$ is the zero element.
For example,
defines an associative multiplication on the set $\{a,b,c,d,e,f\}$.
The number of 3 nilpotent converges to the number of semigroups (up to isomorphism and anti-isomorphism) quite quickly:
$$ \begin{array}{l|l|l|l|l|l|l|l|l} n&1&2&3&4&5&6&7&8\\\hline \text{number of semigroups}&1& 4& 18& 126& 1160& 15973& 836021& 1843120128\\ \text{number of 3-nilpotent semigroups}& 0& 0& 1& 8& 84& 2660& 609797& 1831687022\\ \end{array} $$
So by $n=8$, 99% of the semigroups are 3-nilpotent.