How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Myhill--Nerode Theory and DFA Minimization
1 · Prerequisites
- Construction of the Natural Numbers
- Countability and Uncountability
- Deterministic Finite Automata and Regular Languages
- Finite Counting, Factorials and Binomial Coefficients
- Formal Languages, Encodings, and Decision Problems
- Linear Recurrences and Rational Generating Functions
- Relations, Functions, and Quotients
- The ZFC Axioms and the Basic Set Constructions
2 · Summary
This page develops the Myhill--Nerode point of view in two parallel forms. First it studies equivalent states inside one DFA and the quotient obtained by merging them. It then passes to Nerode equivalence on words, proves the Myhill--Nerode characterization of regular languages, and reads minimal DFA structure off the resulting equivalence classes.
The closing items package two standard applications. One is algorithmic: the table-filling procedure detects exactly the distinguishable state pairs and therefore computes DFA minimization. The other is structural: the pumping lemma is a necessary consequence of finite-state behavior, but it is weaker than the full Myhill--Nerode criterion and can be misused when its quantifiers are read in the wrong order.
3 · Logical flowchart
4 · Definitions, theorems and proofs
The right language of a DFA state and state equivalence
Definition
Let be a DFA with extended transition function .
For a state , the right language of is
Two states are state-equivalent when they have the same right language: Equivalently,
Remarks
-
State-equivalent states have the same future accepting behavior under every continuation.
-
Distinct states may still be equivalent; minimization identifies exactly such redundancies.
State-equivalent DFA states stay equivalent after every input word
Statement
For every DFA , the state-equivalence relation of The right language of a DFA state and state equivalence is an equivalence relation on the state set, and for every word ,
Facts & Assumptions
Given: A DFA with extended transition function .
By The right language of a DFA state and state equivalence, means that for every continuation one has if and only if .
By Equivalence relation, equivalence class, and the quotient set , a relation is an equivalence relation exactly when it is reflexive, symmetric, and transitive.
By The extended transition function of a DFA, and for every state , word , and letter .
Proof
Equality of right languages is reflexive, symmetric, and transitive, so [L1] and [L2] show that is an equivalence relation on .
Fix a letter . If , then induction on using [L3] gives and for every word ; applying [L1] to the continuation therefore yields .
We now induct on the word . The case is immediate from [L3]. If the claim holds for and , then step 1.2 applied to the equivalent states and gives .
Steps 1.1 and 2.1 prove both claims.
The quotient DFA by state equivalence
Definition
Let be a DFA, and let be the state-equivalence relation of The right language of a DFA state and state equivalence. Its quotient set is available by State-equivalent DFA states stay equivalent after every input word together with Equivalence relation, equivalence class, and the quotient set .
The quotient DFA by state equivalence is the automaton where and
The next item proves that these definitions do not depend on the chosen representatives and that the quotient recognizes the same language as .
The quotient by state equivalence is a well-defined equivalent DFA
Statement
Let be a DFA. The quotient automaton of The quotient DFA by state equivalence is well defined and recognizes the same language as .
Facts & Assumptions
Given: A DFA with extended transition function .
By The quotient DFA by state equivalence, the quotient automaton uses states , transition rule , start state , and accepting classes .
By State-equivalent DFA states stay equivalent after every input word, if then for every word , hence in particular for every letter .
By Acceptance of a word by a DFA and the recognized language, a DFA accepts a word exactly when the state reached by its extended transition function is accepting.
By The extended transition function of a DFA, the extended transition satisfies and .
By The right language of a DFA state and state equivalence, means that for every continuation one has if and only if .
Proof
Step [L2] shows that if then for every letter , so is independent of the chosen representative.
If and , then [L4] gives and . Applying [L5] to the continuation therefore shows as well. Thus is representative-independent.
Let be the extended transition of the quotient DFA. Induction on using [L1] and [L4] gives for every state class and every word .
For every word , step 1.3 and [L3] give .
Therefore the quotient DFA is well defined and equivalent to .
Nerode equivalence of words
Definition
Let be a language over an alphabet .
Two words are Nerode-equivalent for when every right continuation tests membership in the same way:
The equivalence classes of are the Nerode classes of . Their number, finite or infinite, is the index of .
Nerode-equivalent words stay equivalent after right concatenation
Statement
For every language , the Nerode relation of Nerode equivalence of words is an equivalence relation on , and for every words ,
Facts & Assumptions
Given: A language .
By Nerode equivalence of words, means that for every continuation one has if and only if .
By Equivalence relation, equivalence class, and the quotient set , it is enough to check reflexivity, symmetry, and transitivity.
Proof
Reflexivity, symmetry, and transitivity follow immediately from the biconditional in [L1], so [L2] shows that is an equivalence relation.
Assume and fix . For every continuation , [L1] applied to the continuation gives , which is exactly the condition .
Therefore is an equivalence relation preserved by right concatenation.
A DFA can realize at most one Nerode class per reachable state
Statement
Let be a DFA recognizing a language . If two words drive from its start state to the same state, then . Consequently, distinct Nerode classes of must reach distinct reachable states of .
Facts & Assumptions
Given: A DFA recognizing , with extended transition function .
By Nerode equivalence of words, to prove it is enough to show that if and only if for every continuation .
By Acceptance of a word by a DFA and the recognized language, a word belongs to exactly when .
Proof
For every state and words , repeated use of [L3] gives ; in particular, and .
If , then step 1.1 implies for every . By [L2], this gives if and only if for every , so [L1] yields .
Therefore every reachable state of contains words from at most one Nerode class, and distinct Nerode classes must land in distinct reachable states.
A language is regular if and only if its Nerode equivalence has finite index
Statement
Let be a language. Then is regular if and only if its Nerode equivalence relation has finite index.
Facts & Assumptions
Given: A language over an alphabet .
By Regular languages, a language is regular exactly when some DFA recognizes it; acceptance and the recognized language are those of Acceptance of a word by a DFA and the recognized language.
By A DFA can realize at most one Nerode class per reachable state, if a DFA recognizes then distinct Nerode classes of must reach distinct reachable states of that DFA.
By Nerode-equivalent words stay equivalent after right concatenation, implies for every letter , so the transition rule on Nerode classes is well defined.
By Deterministic finite automata, a DFA is determined by a finite state set, a start state, a total transition rule on letters, and a chosen accepting subset.
Proof
Assume is regular. By [L1], choose a DFA recognizing . Step [L2] gives an injection from the set of Nerode classes of into the reachable state set of , so the index of is finite because a DFA has only finitely many states.
Assume conversely that has finite index. Let be its finite set of equivalence classes, let the start state be , define , and let . By [L3], the transition rule is well defined, so [L4] gives a DFA .
For every word , induction on shows that the state reached by from is exactly . Hence , so recognizes and [L1] implies that is regular.
Steps 1.1 and 2.1 prove both implications.
Nerode classes form the canonical minimal DFA
Statement
If is regular, then the DFA whose states are the Nerode classes of is a minimal DFA for . Its state set and transition structure depend only on , so it is canonical.
Facts & Assumptions
Given: A regular language .
By A language is regular if and only if its Nerode equivalence has finite index, finite-index Nerode classes build a DFA recognizing .
By A DFA can realize at most one Nerode class per reachable state, every DFA recognizing has distinct reachable states for distinct Nerode classes.
Proof
Because is regular, [L1] provides a DFA whose states are exactly the Nerode classes of and which recognizes .
Let be any DFA recognizing . Every Nerode class contains some word , and the state reached by on is reachable. By [L2], two distinct Nerode classes cannot reach the same state of , so has at least as many reachable states as has states.
Step 1.2 shows that no DFA for can use fewer reachable states than , so is minimal. It is canonical because its states are defined directly from the language rather than from an auxiliary machine.
Minimal DFAs are unique up to start-state-preserving isomorphism
Statement
If two DFAs are minimal among the DFAs recognizing the same regular language , then there is an isomorphism between them that sends the start state of one to the start state of the other.
Facts & Assumptions
Given: Minimal DFAs and recognizing the same regular language .
By Nerode classes form the canonical minimal DFA, the Nerode-class DFA is a minimal DFA for .
By Reachable states of a DFA, a state is reachable exactly when some input word leads to it from the start state.
By Removing unreachable states preserves the recognized language, deleting unreachable states preserves the recognized language.
Proof
A minimal DFA has no unreachable states. Indeed, if had an unreachable state, then [L3] would remove it without changing the language, contradicting minimality.
Let be the canonical Nerode-class DFA from [L1]. Because step 1.1 shows that every state of is reachable, for each state of we may choose a word with , which is possible by [L2], and send to the Nerode class . If two words reach the same state , then every continuation is accepted or rejected identically from that state, so and determine the same Nerode class. Thus the map is well defined. For any Nerode class , the state reached by on maps to , so the map is surjective onto the state set of .
Both and are minimal DFAs for : by hypothesis and by [L1]. Therefore their finite state sets have the same cardinality. The surjection from step 2.1 between finite sets of equal size is therefore a bijection.
The bijection of steps 2.1 and 3.1 sends the start state to , and its definition via reaching words shows that it preserves letter transitions and accepting states. Hence each is pointed-isomorphic to , so and are pointed-isomorphic to one another.
Distinguishing words for states and for prefixes
Definition
Let be a DFA with extended transition function .
-
A word distinguishes states when exactly one of the states and is accepting. Equivalently, witnesses that and are not state-equivalent.
-
For a language , a word distinguishes words when exactly one of and lies in . Equivalently, witnesses that .
Remarks
-
Distinguishing words are the concrete witnesses behind both minimization and Myhill--Nerode lower bounds.
-
The empty word is allowed; it distinguishes two states exactly when one is accepting and the other is not.
The table-filling algorithm computes state equivalence and DFA minimization
Statement
Fix a DFA . Delete its unreachable states, mark every accepting/nonaccepting pair, and then repeatedly mark any unmarked pair for which some letter has already-marked successor pair . When the process stabilizes, the unmarked pairs are exactly the state-equivalent pairs of , and merging each equivalence class yields a minimal DFA for the same language.
Facts & Assumptions
Given: A DFA .
By Removing unreachable states preserves the recognized language, we may delete unreachable states first without changing the recognized language.
By Distinguishing words for states and for prefixes, a pair of states is distinguishable exactly when some continuation accepts from one state and rejects from the other.
By State-equivalent DFA states stay equivalent after every input word, state equivalence is preserved by every input word.
By The quotient by state equivalence is a well-defined equivalent DFA, quotienting by state equivalence gives an equivalent DFA.
Proof
Replace by its reachable part using [L1]. Let be the set of accepting/nonaccepting pairs, and for let be obtained from by also marking every pair for which some letter has . Put .
We prove by induction on that every pair in has a distinguishing word of length at most . For , the empty word distinguishes every accepting/nonaccepting pair by [L2]. For the induction step, if is newly marked because , prepend the letter to a distinguishing word for the successor pair.
Conversely, we induct on the length of a distinguishing word . If , then the pair is in . If , then distinguishes and , so the induction hypothesis puts the successor pair in some , and the algorithm then marks at the next stage. Therefore a pair is marked exactly when it is distinguishable.
Unmarked pairs are therefore precisely the indistinguishable pairs, hence precisely the state-equivalent pairs by [L2]. By [L3] this is an equivalence relation, and [L4] gives an equivalent quotient DFA .
Let be any reachable DFA equivalent to . Because step 1.1 replaced by its reachable part, each state class of has a representative state reached in by some word . Send to the state reached by on . If , then their representatives are distinguishable by step 3.1; choose a distinguishing word . The words and are then accepted differently by , hence also by the equivalent DFA , so the reached states of are distinct. Thus this map from the states of into the states of is injective.
Therefore every reachable DFA equivalent to has at least as many states as . Since itself is equivalent to by step 4.1, it is a minimal DFA for the same language.
The pumping lemma for regular languages
Statement
If is regular, then there exists such that every word with can be written as with
Facts & Assumptions
Given: A regular language .
By Regular languages, some DFA recognizes .
By Deterministic finite automata, a DFA has only finitely many states.
By Acceptance of a word by a DFA and the recognized language, a word is in exactly when an accepting state is reached after reading it in some DFA for .
By The extended transition function of a DFA, reading a word letter by letter determines the successive run states.
By The pigeonhole principle on , among objects placed into only positions, some two positions coincide.
Proof
Choose the DFA recognizing supplied by [L0], and let be its number of states, which is finite by [L1]. Fix a word with . As reads the prefixes , [L3] gives visited states.
By [L4], two of those first visited states are equal; write them as the states after the prefixes of lengths , and set , , and . Then , , and .
Because the run returns to the same state after reading , repeating or deleting that loop does not change the state reached before the suffix . Therefore [L2] implies for every , so the factorization from step 2.1 satisfies all three required conditions.
Infinitely many pairwise distinguishable prefixes force nonregularity
Statement
Let . If there are infinitely many words in that are pairwise distinguished by suffixes, then is not regular.
Facts & Assumptions
Given: A language with infinitely many pairwise distinguishable words.
By Distinguishing words for states and for prefixes, a suffix distinguishes two words exactly when those two words are not Nerode-equivalent.
By A language is regular if and only if its Nerode equivalence has finite index, a regular language has only finitely many Nerode classes.
Proof
If two words are pairwise distinguished by suffixes, then [L1] shows that they lie in distinct Nerode classes.
Therefore the infinitely many given words occupy infinitely many Nerode classes. By [L2], cannot be regular.
FALSE: the pumping lemma characterizes the regular languages
Statement
If a language satisfies the regular pumping property, then it is regular.
Facts & Assumptions
Given: The language
By Infinitely many pairwise distinguishable prefixes force nonregularity, a language with infinitely many pairwise distinguishable prefixes is not regular.
Refutation
The language satisfies the pumping conclusion with pumping length . If with , write with and choose , , ; then , the original word is , and for every the word lies in by using the one-letter witness word and the nonempty suffix .
For each , let and . Then lies in by taking witness word and suffix . If and were in , write with and . The word has exactly one doubled adjacent pair, namely the middle 11 at the junction between and . Any prefix of the form has a doubled middle pair at the boundary between and , so that boundary must be this unique 11. Hence , which makes the palindromic prefix have length . But because , so no such factorization with nonempty exists. Therefore , and the prefixes are pairwise distinguishable.
If instead , then with because ; writing and choosing , , pumps entirely inside the nonempty suffix , so every stays in . Thus every sufficiently long word in has a legal pumping decomposition.
Step 1.2 and [L2] show that is not regular, while steps 1.1 and 2.1 show that still has the regular pumping property. Therefore the pumping property does not characterize regularity, and the statement is false.
FALSE: the pumping lemma still works if its quantifiers are reordered
Statement
In the pumping lemma, once a pumping length is fixed, every legal decomposition of every sufficiently long word pumps.
Facts & Assumptions
Given: The regular language
By The pumping lemma for regular languages, a regular language only guarantees the existence of a good decomposition for each sufficiently long word.
Refutation
The language is regular: a two-state DFA that toggles parity after each input symbol accepts exactly the words of odd length.
Fix any pumping length and take . The decomposition , , is legal because and , but pumping once gives , whose length is even, so . Thus this legal decomposition does not pump.
Step 1.2 shows that a regular language can have bad legal decompositions even though [L1] supplies some good one. Therefore the quantifiers cannot be reordered as stated, and the statement is false.
5 · Examples, counterexamples and false statements
None yet.