A semigroup$G$ is a set together with a binary operation$\cdot: G \times G \longrightarrow G$ which satisfies the associativeproperty: $(a \cdot b) \cdot c = a \cdot (b \cdot c)$ for all $a,b,c \in G$
The set $G$ is not required to be nonempty.
Let $G,H$ be two semigroups. A semigroup homomorphism from $G$ to $H$ is a function$f:G\to H$ such that $f(ab)=f(a)f(b)$