Automatic group 2026-10-06
An automatic group admits an automatic structure for a group: a regular language of representatives and synchronous group multiplier automata recognizing right multiplication by each generator and equality of representatives. Representatives need not be unique. This finite-state description yields effective algorithms for the word problem for a group.
An automatic structure for a group consists of a finite generating alphabet , a surjective representative regular language , and finite-state automata accepting the padded convolutions of words in satisfying for each . Symmetry of and uniqueness of representatives are additional conditions, not part of this definition.
The canonical residual automaton of a regular language has its distinct left quotients of a formal language as states, initial state , accepting states those containing the empty word, and letter transition . It is a complete minimal deterministic finite automaton; every other complete minimal deterministic finite automaton for that language is isomorphic to it.
Kleene theorem Created 2026-09-24 Updated 2026-09-29
Kleene's theorem states that a language is denoted by a regular expression exactly when it is accepted by a finite automaton.
For a word and a formal language , the left quotient is the possible continuation language after the prefix . Two prefixes have the same left quotient exactly when they are Myhill-Nerode equivalent. For a regular language only finitely many distinct left quotients occur.
Yes: regular languages are closed under the shuffle of formal languages. The construction must allow letters common to both alphabets to be assigned to either input word.
Take complete deterministic finite automata recognizing . Construct a nondeterministic finite automaton on over . Its initial state is and its accepting states form . On a letter , its possible moves from are
Both moves are allowed when belongs to both alphabets. They may coincide; that causes no difficulty.
For every run, record whether each move updated the first or the second coordinate. The letters assigned to each coordinate, in their original order, form two words . The final coordinate states are exactly the states reached by reading in . Thus an accepting run expresses the input as an interleaving of a word of and a word of .
Conversely, given such an interleaving, assign each input position to the word from which it came. The corresponding choices of transitions form a run ending in . This proves equality between the recognized formal language and the shuffle of formal languages, in both directions. No assumption of disjoint alphabets is needed. If one contributing word is the empty word, no move need update that coordinate; the initial pair is accepting exactly when both empty words are accepted.
Apply the powerset construction to this nondeterministic finite automaton to obtain a deterministic finite automaton. In particular,
The minimal deterministic finite automaton is unique up to an isomorphism preserving the initial state, transitions and accepting states. We use complete deterministic finite automata over the fixed alphabet; the PDF's abbreviation FDA has this meaning. State names themselves cannot be unique.
For words , introduce the Myhill-Nerode equivalence
It is an equivalence relation, and appending the same letter to equivalent words preserves it: a suffix after is the suffix after . Since is a regular language, take any recognizing deterministic finite automaton. Words reaching the same state are equivalent, since every further suffix gives the same computation. Thus has finite index.
The canonical residual automaton has one state for each class, initial state , transition , and accepting states those with . These choices are well-defined by Myhill-Nerode equivalence. Induction on the input length shows that reading reaches , so the deterministic finite automaton recognizes , and all its states are accessible states of a deterministic finite automaton. The same state can be described by the left quotient of a formal language
Two states are different precisely when some suffix distinguishes their acceptance behavior.
Every recognizing deterministic finite automaton has at least as many states as there are classes: pick a representative from each class; two different representatives cannot reach the same state. The canonical residual automaton attains this bound, and therefore is a minimal deterministic finite automaton.
For uniqueness, let be any minimal deterministic finite automaton. All its states are accessible, since removing inaccessible states leaves a complete recognizing deterministic finite automaton with fewer states. Map a state reached by to . This is well-defined because two words reaching the same state are equivalent. It is surjective because every class has a representative. Both sets have the minimal number of states, so it is a bijection. It preserves the initial state and transitions by construction, and preserves accepting states by taking the empty word as the suffix. This is the required isomorphism with the canonical residual automaton, proving
The empty word is included throughout, and empty or universal regular languages have the corresponding one-state complete deterministic finite automata.
The regular language is nonempty because it represents every element of the group. Find any accepted word using Breadth-first search in its finite-state automaton. If is the empty word, it already represents the identity.
Otherwise begin with and repeatedly apply the linear-time multiplication in an automatic structure to the letters
These letters belong to by symmetry of the alphabet. All intermediate words lie in , and the final word represents
Hence an identity representative can be constructed effectively:
This is a finite preliminary computation depending only on the fixed automatic structure for a group; it uses no test for whether an arbitrary word represents the identity.
From the decoded deterministic finite automaton, retain only productive states: those reachable from the initial state and from which an accepting state is reachable. Both sets are computable by finite graph search. Its regular language is infinite precisely when this productive directed graph contains a directed cycle.
Indeed, a cycle on a route from the start to acceptance can be repeated arbitrarily often, giving accepted words of different lengths. Conversely an accepted path of length at least the number of productive states repeats one such state and gives a productive cycle. Therefore absence of cycles bounds every accepted length strictly below that number. Cycle detection is a finite algorithm, proving that finiteness of the accepted language is decidable.
When it is finite, enumerate every word of length less than the number of states and simulate acceptance, then count the accepted words. This includes the empty word. Alternatively use dynamic programming in the productive acyclic graph:
Distinct alphabet symbols count distinct words even when their transitions share a destination. The result is , or zero if the start state is not productive. Validity of the encoding is checked first, so the set of valid finite-language codes is recursive set.
Let a deterministic finite automaton recognizing the regular language have states , start state , accepting states , and transition function . Construct a context-free grammar with one nonterminal for every state, start symbol , and productions
Induction on the length of a word shows that derives exactly when the automaton reaches from after reading . The terminal production can then end the derivation precisely at an accepting state. Thus the grammar generates exactly the recognized language, proving every regular language is a context-free language. This is actually a right-linear grammar, a special case of a context-free grammar.
Treat the fixed letters , the empty-language and empty-word symbols, and the punctuation of expressions as a finite token alphabet. In the usual syntax allowing parentheses, union, concatenation, and star, the following context-free grammar generates exactly the syntactically valid regular expressions:
Structural induction proves that every generated string is an expression and that every expression has a derivation. Grammar ambiguity does not affect the context-free language assertion.
If the language of these expressions were a regular language, its intersection with the regular token language consisting of some opening parentheses, then , then some closing parentheses would be regular. That intersection is exactly
The pumping lemma for regular languages contradicts regularity: a sufficiently long opening-parenthesis prefix forces a pumpable segment wholly within that prefix, and pumping it changes the two parenthesis counts unequally. Hence the expression syntax is context-free but not regular. This conclusion concerns the strings describing expressions, not the languages those expressions denote; it uses the usual concrete syntax with arbitrary nested parentheses.
Use . The context-free grammar generates exactly , so it is a context-free language. It is not a regular language: if is a pumping length, any allowed decomposition of has a nonempty pumped segment consisting only of 's. Pumping down leaves fewer 's than 's, contradicting the pumping lemma for regular languages. Thus is a context-free language but not a regular language.
Context-free languages are closed under union: use a new start symbol with alternatives for two renamed context-free grammars. If they were closed under complement in , De Morgan's laws would give
contradicting the preceding intersection example. Therefore some CFL has a non-context-free complement. This is an existence argument; it does not assert that both complements of the particular are non-context-free.
A concrete choice is . Words outside form a regular language. Among words inside it, membership in means the first two counts or the last two counts differ. Each unequal-count comparison has a context-free grammar: for with , use , ; for , replace by . Append any number of 's, or prefix any number of 's for the analogous comparison. Taking these unions gives a context-free language whose complement is the non-context-free equal-three-count language. These productions are definitions of the example, not a restriction to strict Chomsky normal form.
Let be the diagonal halting set, which is undecidable. The pumping argument below actually holds for every subset ; nonregularity needs the stated convention, or at least a set of exponents whose unary language is nonregular.
The pumping lemma for regular languages holds with pumping length one. For an accepted nonempty word, pump its first symbol. A word containing only s remains in even if that symbol is deleted. If there is a zero and a nonempty prefix before its last zero, pumping the first symbol leaves the last zero and its following ones unchanged. If the word is , pumping its initial zero produces ; this is accepted for , and for it belongs to . In every case the pumped substring is nonempty and lies in the first position.
If were a regular language, closure under intersection would make
regular. A finite-state automaton for this intersection would decide membership of in the diagonal halting set by reading , a contradiction. Thus satisfies the pumping lemma but is not regular, under the usual meaning of . If were arbitrary, the printed conclusion would be false, for example for .
The pumping lemma for regular languages states that for every regular language there is an integer such that every with can be written
with
To prove it, let a deterministic finite automaton with states recognize . During the reading of the first symbols of an accepted word , the automaton visits states, including the initial state. By the pigeonhole principle, two of them agree, say with . Let be the first symbols, the next symbols, and the remaining suffix. Reading is a nonempty closed path from to itself. Traversing this path any number of times and then reading therefore reaches the same accept state. This proves all three assertions.