← LibraryFinite State Acceptors and Recognisable LanguagesEngineering · MathematicsLesson 4/5← PrevNext →
GuidePublished 6 Aug 20266 min readBy Kevin Joginuniversal algebraabstract algebramathematicsfinite automaton

Combinatorial and Automata Applications

Finite State Acceptors and Recognisable Languages

A finite acceptor is a unary algebra with a distinguished subset. Once phrased that way, the pumping lemma and the closure properties are algebraic facts about finite index.

Engineering · Mathematics6 min readKV-MATH-0230
Learning objectives

01An acceptor is a unary algebra

A deterministic finite acceptor over an alphabet Σ consists of a finite state set Q, a transition function for each letter, an initial state and a set of accepting states.

A = ⟨Q, (δa)a∈Σ⟩   with δa : Q → Q
One unary operation per letter of the alphabet. The initial state and accepting set are extra data layered on top of the algebra, not part of the type.

The algebra proper is the unary structure; the initial state and accepting set turn it into a language-recognising device. Separating the two is what makes the algebraic arguments clean: the transition structure is an algebra of type (1, 1, …, 1), and everything about it is inherited from the general theory of unary algebras.

NoteUnary algebras are unusually well behaved

Algebras with only unary operations have distributive subuniverse lattices, and their subuniverses are the sets closed under all transitions. Generation reduces to orbit closure. This tractability is why automata theory yields clean results where general algebra does not.

02Words, the free monoid and the extended transition

The set Σ* of words over Σ is the free monoid on Σ. The transition function extends from letters to words by composition, and this extension is exactly the universal property of the free monoid applied to the transformation monoid of Q.

  1. Letters give unary maps
    Each a ∈ Σ gives δ_a : Q → Q, an element of the monoid of all transformations of Q.
  2. The free monoid maps in
    By freeness, the assignment a ↦ δ_a extends uniquely to a monoid homomorphism Σ* → T(Q), the transformation monoid.
  3. Words act on states
    δ_w for a word w is the composite of the letter maps. The empty word gives the identity.
  4. Acceptance
    w is accepted when δ_w applied to the initial state lands in the accepting set. The language accepted is the set of all such w.

A language is recognisable when it is the language accepted by some finite acceptor. The image of Σ* in T(Q) is a finite monoid, and that monoid — the transition monoid — carries all the information, a point developed on the next page.

03The Myhill–Nerode congruence

Given a language L ⊆ Σ*, define a right congruence on Σ* by declaring two words equivalent when no suffix distinguishes them.

u ≡L v  ⟺  for every w ∈ Σ*: uw ∈ L if and only if vw ∈ L
A right congruence: compatible with right multiplication, though not necessarily with left multiplication.
Key resultThe Myhill–Nerode theorem

A language L is recognisable if and only if ≡L has finite index — finitely many equivalence classes. Moreover the number of classes equals the number of states of the minimal acceptor for L.

The theorem converts a question about the existence of a machine into a question about the index of an explicitly defined equivalence relation. That is a genuine reduction: index is computable for many languages where guessing an acceptor is not.

04The minimal automaton as a quotient

ProcedureConstructing the minimal acceptor
in: language L or any acceptor for it → out: the minimal acceptor, unique up to isomorphism
  1. input: recognisable language L ⊆ Σ*
  2. form the quotient Σ*/≡_L — finitely many classes by Myhill–Nerode
  3. states := the classes; initial state := the class of the empty word
  4. transition: δ_a([u]) := [ua] (well defined since ≡_L is a right congruence)
  5. accepting states := { [u] : u ∈ L } (well defined by taking w empty)
  6. the result accepts exactly L and has the fewest possible states
  7. equivalently: minimise any acceptor by quotienting by state indistinguishability
Correctness: well-definedness of the transition is exactly the right congruence property. Minimality: any acceptor for L induces a refinement of ≡_L, so has at least as many reachable states. Caveat: minimality is up to isomorphism and assumes all states are reachable.

Read algebraically, minimisation is the first isomorphism theorem. The acceptor maps onto its quotient by the indistinguishability congruence, and the quotient is minimal because the congruence is the largest one compatible with the accepting set.

05Closure properties from products

Recognisable languages are closed under the Boolean operations, and the proofs are direct product constructions.

Closure properties and their constructions
OperationConstructionState count
Complementswap accepting and non-accepting statesunchanged
Intersectionproduct acceptor, accept when both acceptproduct of state counts
Unionproduct acceptor, accept when either acceptsproduct of state counts
Concatenationnondeterministic construction, then determinisemay be exponential
Kleene starnondeterministic construction, then determinisemay be exponential
Reversalreverse transitions, then determinisemay be exponential

The Boolean cases are algebraically trivial: the product acceptor is the direct product of the two unary algebras, and the accepting set is chosen appropriately in the product. Complementation needs the acceptor to be deterministic and complete, which is why nondeterministic acceptors do not close under complement so easily.

06The pumping lemma as pigeonhole

Any sufficiently long accepted word must revisit a state, and the segment between the two visits can be repeated arbitrarily.

ProcedureThe pumping argument
in: acceptor and a long accepted word → out: an infinite family of accepted words
  1. input: acceptor with n states; accepted word w with |w| ≥ n
  2. the run on w visits |w| + 1 states, so by pigeonhole two coincide
  3. write w = xyz where the repeated state occurs after x and after xy, y ≠ ε
  4. then δ_y fixes that state, so it may be traversed any number of times
  5. therefore xy^k z is accepted for every k ≥ 0
  6. contrapositive: if some xy^k z fails, the language is not recognisable
Correctness: pure pigeonhole on the finite state set. Caveat: the lemma is a necessary condition only. Languages satisfying the pumping condition can still fail to be recognisable, so a successful pumping argument proves non-recognisability but a failed one proves nothing.

Algebraically this says that the transition monoid is finite, so the powers of any element are eventually periodic. Finiteness of the monoid is the whole content, and every pumping-style argument is a restatement of it.

Frequently asked

Are nondeterministic acceptors more powerful?

No — the subset construction converts any nondeterministic acceptor into a deterministic one accepting the same language, at a possible exponential cost in states. The class of recognisable languages is unchanged, which is why the algebraic characterisation via finite index is insensitive to determinism.

Is the minimal acceptor unique?

Yes, up to isomorphism, provided unreachable states are discarded. This is unusual: most minimisation problems in algebra have no canonical answer. The uniqueness comes from ≡L being the largest right congruence saturating L, so the quotient is canonically determined by the language.

Why treat automata algebraically at all?

Because it makes the results theorems about finite algebras rather than facts about machines, which connects them to the rest of the subject. The Kleene and Schützenberger characterisations on the next page are statements about monoid varieties, and they were found by taking the algebraic view seriously.

Sources and further reading

Original KEVOS® explanatory article. Written from the topic map of the cited works; no text is reproduced from them.

Continue learning

Orthogonal Latin Squares and the Refutation of Euler's ConjectureGuide · MathematicsNEXT LESSON →Syntactic Monoids and Kleene's TheoremGuide · MathematicsQuasigroups, Loops and Latin SquaresGuide · MathematicsSteiner Triple Systems, Squags and SloopsGuide · Mathematics