A set G with a binary operation o is called a semigroup if G is closed under o and the binary operation o is associative on G. This semigroup is denoted by (G, o). For example, (Z, +) is a semigroup.