Algebraic Automata Theory #1 - Semigroups

2026-09-02

Most intro courses to automata theory only cover the classical theory of authomata: DFAs, NFAs, regular expressions, their properties, and the conversions between them. But some important results in automata theory cannot be proved using only those methods. Sometimes we need to reach to the scary algebraic structures of semigroups and monoids.

Algebraic Automata Theory studies the (perhaps surprising) connection between automata and algebra. This series of posts are my personal notes as I try to learn AAT. I’m sure they contain many errors, but I hope that they are usefull to someone trying to learn it too.

Since we want to study the connection between algebra and automata, we need to start with some algebrai concepts.

Def: A semigroup is a pair S=(S,⋅)S = (S, \cdot) where SS is a set and ⋅:S×S→S\cdot : S \times S \to S is an associative binary operation on SS, that is: a⋅(b⋅c)=(a⋅b)⋅c∀a,b,c∈S a \cdot (b \cdot c) = (a \cdot b) \cdot c \qquad \forall a,b,c \in S

Since the semigroup operation (often called “multiplication”) is associative, we don’t need to worry about parenthesis since the evaluation of expressions becomes unambiguous. It is common to use the notation ana^n to denote the multiplication of n∈ℕn \in \mathbb N copies of a∈Sa\in S.

Lemma: The following properties hold:
1. anam=an+ma^n a^m = a^{n+m}
2. (an)m=anm(a^n)^m = a^{nm}

There are some important kinds of semigroup elements with certain properties:
1. Left identities: 1l⋅a=a(∀a∈S)1_l \cdot a = a ~ (\forall a \in S)
2. Right identities: a⋅1r=a(∀a∈S)a\cdot 1_r = a ~ (\forall a \in S)
3. Left zeroes: 0l⋅a=0l(∀a∈S)0_l\cdot a = 0_l ~ (\forall a \in S)
4. Right zeroes: a⋅0r=0r(∀a∈S)a\cdot 0_r = 0_r ~ (\forall a \in S)
5. Identities: 1⋅a=a=a⋅1(∀a∈S)1 \cdot a = a = a \cdot 1 ~ (\forall a \in S)
6. Zeroes: 0⋅a=0=a⋅0(∀a∈S)0 \cdot a = 0 = a \cdot 0 ~ (\forall a \in S)

Lemma: A semigroup can have, at most, one identity and one zero element.

Proof: Let a,ba, b be two identity elements. Then a=ab=ba = ab = b. The same argument applies to the other case.

A semigroup with identity is called a monoid (which are also important for automata theory):

Def: A monoid is a triple M=(M,⋅,1)M = (M, \cdot, 1) where MM is a set, ⋅:M×M→M\cdot : M \times M \to M is an associative binary operation on MM, and 1∈M1\in M is an identity element, that is: a⋅(b⋅c)=(a⋅b)⋅c∀a,b,c∈M a \cdot (b \cdot c) = (a \cdot b) \cdot c \qquad \forall a,b,c \in M a⋅1=a=1⋅a∀a∈M a \cdot 1 = a = 1 \cdot a \qquad \forall a \in M

Any semigroup SS can be turned into a monoid S1S^1: S1={Sif S has an identity elementS∪{1}otherwise S^1 = \begin{cases} S & \text{if } S \text{ has an identity element}\\ S\cup\{1\} & \text{otherwise} \end{cases} where 1∉S1 \notin S is the identity of the monoid and the multiplication is extended accordingly.

There are other important kinds of semigroups:
1. Finite Semigroups: the carrier set is finite
2. Abelian Semigroups: the multiplication is commutative
3. Groups: All elements have inverses

Another important kind of element of a semigroup are the idempotents. An element i∈Si \in S is said to be idempotent if i2=ii^2 = i. The set of idempotent elements of SS is denoted by E(S)E(S).

Thm: Every finite semigroup has an idempotent element.

Proof: Let a∈Sa \in S. Since SS is finite, the sequence a,a2,a3,⋯a, a^2, a^3, \cdots must eventually become periodic with period pp. Let kk be the first integer such that ak=ak+pa^k = a^{k+p}. Let m=kpm = kp. Since m>km > k, am=am+kp=am+m=a2m=(am)2a^m = a^{m + kp} = a^{m+m} = a^{2m} = (a^m)^2. Thus, ama^m is an idempotent element.

Next time, we will tackle homomorphisms.