idempotent e of the semigroup there is a unique maximal subgroup containing e. Each maximal subgroup arises in this way, so there is a one-to-one correspondence between idempotents and maximal subgroups. Here the term maximal subgroup differs from its standard use in group theory. More can often be said when the order is finite. For example, every nonempty finite semigroup is periodic, and has a minimal ideal and at least one idempotent. The number of finite semigroups of a given size (greater than 1) is (obviously) larger than the number of groups of the same size. For example, of the sixteen possible "multiplication tables" for a set of two elements eight form semigroups whereas only four of these are monoids and only two form groups. For more on the structure of finite semigroups, see Krohn–Rhodes theory. Special classes of semigroups A monoid is a semigroup with an identity element. A group is a monoid in which every element has an inverse element. A subsemigroup is a subset of a semigroup that is closed under the semigroup operation. A cancellative semigroup is one having the cancellation property: implies and similarly for . Every group is a cancellative semigroup, and every finite cancellative semigroup is a group. A band is a semigroup whose operation is idempotent. A semilattice is a semigroup whose operation is idempotent and commutative. 0-simple semigroups. Transformation semigroups: any finite semigroup S can be represented by transformations of a (state-) set Q of at most states. Each element x of S then maps Q into itself and sequence xy is defined by for each q in Q. Sequencing clearly is an associative operation, here equivalent to function composition. This representation is basic for any automaton or finite-state machine (FSM). The bicyclic semigroup is in fact a monoid, which can be described as the free semigroup on two generators p and q, under the relation . C0-semigroups. Regular semigroups. Every element x has at least one inverse y satisfying and ; the elements x and y are sometimes called "mutually inverse". Inverse semigroups are regular semigroups where every element has exactly one inverse. Alternatively, a regular semigroup is inverse if and only if any two idempotents commute. Affine semigroup: a semigroup that is isomorphic to a finitely-generated subsemigroup of Zd. These semigroups have applications to commutative algebra. Structure theorem for commutative semigroups There is a structure theorem for commutative semigroups