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.
Deterministic Finite Automata and Regular Languages
1 · Prerequisites
- Construction of the Natural Numbers
- Countability and Uncountability
- 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 fixes deterministic finite automata as total machines over a fixed alphabet, proves the basic recursion law for the extended transition function, and then uses explicit constructions for finite-language recognition, Boolean closure, reachable-state trimming, and the sink-state repair needed to turn the published prefix automaton for forbidden factors into a genuine DFA.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Deterministic finite automata
Definition
Let be an alphabet. A deterministic finite automaton over is a quintuple such that:
- is a finite set of states.
- is the start state.
- is the set of accepting states.
- is a total transition function in the sense of A function is a relation with and implying ; , the value , domain and codomain, with domain exactly the Cartesian product of The Cartesian product .
The adjective "deterministic" means that for each pair there is exactly one next state , and "finite" means that has finite cardinality in the sense of The cardinality of a finite set.
Remarks
-
A transition diagram that omits a letter from some state does not yet specify a DFA, because totality of is part of the definition.
-
The ambient alphabet is part of the data. The same directed graph can define different automata if the chosen alphabet changes.
The extended transition function of a DFA
Definition
Let be a DFA. An extended transition function for is a function satisfying the two clauses for every , and for every state , every word , and every letter .
Thus is intended to be the state reached from after reading the whole word . The next theorem proves that such a function exists and is unique.
The extended transition function exists and is unique
Statement
For every DFA there exists a unique function such that, for all , , and ,
Facts & Assumptions
Given: A DFA .
By The extended transition function of a DFA, an extended transition function for is exactly a function satisfying the two displayed clauses for and .
Proof
Fix and a word . Define a sequence of states by and for , and then define . This gives a function because the DFA transition function supplies exactly one next state at each letter.
If , then and step 1.1 gives . If with and , then the last state in the sequence is . So the function from step 1.1 satisfies the two clauses of [L1].
Let be any other function satisfying [L1]. We prove by induction on the length of that for every . For , both values are by [L1] and step 2.1.
Assume for all words of length , and let have length . Then [L1] gives , and the induction hypothesis turns this into by step 2.1.
Steps 3.1 and 3.2 show that every function satisfying [L1] agrees with the function built in step 1.1, so the extended transition function exists and is unique.
Extended DFA transition respects concatenation
Statement
Let be a DFA with extended transition function . Then for all and all words ,
Facts & Assumptions
Given: A DFA with its unique extended transition function , a state , and words .
By The extended transition function exists and is unique, the function satisfies and for all states , words , and letters .
Proof
We prove the identity by induction on the length of . If , then [L1] gives and also .
Assume the identity holds for a word , and let . We compare the two sides for .
By [L1], The induction hypothesis turns this into
Applying [L1] again, the last expression is exactly . Therefore .
Steps 1.1, 2.1, and 3.1 complete the induction on , so for all .
Acceptance of a word by a DFA and the recognized language
Definition
Let be a DFA, and let be its extended transition function. This function exists and is unique by The extended transition function exists and is unique.
A word is accepted by when
The language recognized by is This is a language over in the sense of Languages over an alphabet.
Remarks
-
Acceptance depends on the chosen start state and accepting set, not just on the transition graph.
-
Two different DFAs may recognize the same language.
Regular languages
Definition
Let be an alphabet. A language is regular when there exists a DFA over such that where is the recognized language of Acceptance of a word by a DFA and the recognized language.
Thus regularity is a property of a language over a fixed alphabet: the machine is a witness, not part of the language itself.
Every finite language is regular
Statement
Every finite language over an alphabet is regular.
Facts & Assumptions
Given: A finite language .
A language over is regular exactly when it is recognized by some DFA over , by Regular languages.
Let be the set consisting of together with every prefix of every word in . Because is finite and each word has only finitely many prefixes, the set is finite.
Proof
Define a machine with state set , start state , accepting set , and transition rule By [F1] the state set is finite, and the transition rule is total on .
We claim that, for every word , the run from ends at the state when , and ends at when . This follows by induction on the length of : appending a letter keeps the machine at the longer prefix exactly when that longer word still lies in , and otherwise sends the run to , where it remains.
A word is accepted by exactly when the final state lies in . By step 1.2 this happens exactly when , because every word in is one of its own prefixes and therefore belongs to .
Thus for the DFA from step 1.1, so [L1] shows that is regular.
The product construction gives DFA's for union and intersection
Statement
Let and be DFA's over the same alphabet, and let .
Then there is a DFA over recognizing , and there is a DFA over recognizing .
Facts & Assumptions
Given: Two DFA's and over the same alphabet .
A word is accepted by a DFA exactly when the extended transition from the start state lands in an accepting state, by Acceptance of a word by a DFA and the recognized language.
For languages over a fixed alphabet, union and intersection are the set-theoretic operations and , by Boolean operations on languages over a fixed alphabet.
Proof
Define the product machine to have state set , start state , and transition rule Intuitively, runs the two machines in parallel on the same input.
We claim that for every pair of states and every word , The claim is proved by induction on the length of : it is immediate for , and appending one letter updates both coordinates exactly as the component machines do.
If the accepting set is , then step 1.2 and [L1] show that a word is accepted exactly when and , that is, exactly when . By [L2], this machine recognizes the intersection.
If the accepting set is , then step 1.2 and [L1] show that a word is accepted exactly when at least one component machine accepts , that is, exactly when . By [L2], this machine recognizes the union.
Therefore the product construction yields DFA's for both intersection and union over the fixed alphabet .
Complementing the accepting states complements the recognized language
Statement
Let be a DFA and let Then
Facts & Assumptions
Given: A DFA over .
For languages over a fixed alphabet, the complement of is , by Boolean operations on languages over a fixed alphabet.
A word is accepted by a DFA exactly when the final state lies in its accepting set, by Acceptance of a word by a DFA and the recognized language.
Proof
The machines and have the same state set, the same start state, and the same transition function. Therefore, for every word , they follow exactly the same run and end in the same state .
By [L2], the word is accepted by exactly when this common final state lies in , which is equivalent to saying that it does not lie in . So is accepted by exactly when is not accepted by .
Since this equivalence holds for every , the language of is precisely , which is by [L1].
Regular languages are closed under the Boolean operations over a fixed alphabet
Statement
Fix an alphabet . If are regular, then every Boolean combination of and inside the same ambient is also regular.
Facts & Assumptions
Given: Regular languages .
Regular languages are exactly the languages recognized by DFA's, by Regular languages.
The product construction gives DFA's for union and intersection, by The product construction gives DFA's for union and intersection.
Complementing the accepting states complements the recognized language, by Complementing the accepting states complements the recognized language.
Proof
By [L1], choose DFA's recognizing and . Then [L2] gives DFA's recognizing and , and [L3] gives a DFA recognizing .
The remaining Boolean operations are obtained from union, intersection, and complement by ordinary set identities inside the fixed ambient set . For instance, and the symmetric difference is .
Therefore every Boolean combination of and over the fixed alphabet is regular.
The product construction gives a DFA for language difference
Statement
Let and be DFA's over the same alphabet , with recognized languages and . Then there is a DFA over recognizing
Facts & Assumptions
Given: Two DFA's and over the same alphabet.
For languages over a fixed alphabet, the difference is , by Boolean operations on languages over a fixed alphabet.
The product construction tracks the two component runs in parallel, by The product construction gives DFA's for union and intersection.
A word is accepted exactly when its final state lies in the accepting set, by Acceptance of a word by a DFA and the recognized language.
Proof
Use the same product machine as in [L2], with state set , start state , and product transition function. This machine reaches the pair of component states reached by and on the same input word.
Declare a pair accepting exactly when and , that is, take accepting set .
By step 1.1 and [L3], a word is accepted by this product machine exactly when accepts and does not accept .
By [L1], that condition is exactly . So the constructed machine recognizes the language difference.
Reachable states of a DFA
Definition
Let be a DFA with extended transition function . A state is reachable when there exists a word such that
The set of all reachable states is the reachable part of the DFA.
Removing unreachable states preserves the recognized language
Statement
Let be a DFA, let be its reachable states, and let be the DFA obtained by restricting to the states . Then
Facts & Assumptions
Given: A DFA and its reachable-state subset .
A state is reachable exactly when it has the form for some input word , by Reachable states of a DFA.
A word is accepted exactly when the extended transition from the start state lands in an accepting state, by Acceptance of a word by a DFA and the recognized language.
Proof
Let be any input word, and consider the run of from on . After reading the prefix , the machine is in the state , so [L1] says every state visited during the run is reachable.
Therefore the entire run of on stays inside , and the restricted machine has exactly the same transitions on those states. So ends in the same final state as on the word .
By [L2], the word is accepted by if and only if that common final state lies in , which is equivalent to the same final state lying in . Hence is accepted by exactly when it is accepted by .
Since this holds for every word , the two machines recognize the same language.
The published prefix automata extend canonically to DFAs for factor-avoidance languages
Statement
Let be a finite alphabet and let be a finite nonempty set of nonempty words over . Starting from the published prefix automaton on , adjoin a new sink state , send every previously rejected letter to , let loop on every letter, and declare every state in accepting while is rejecting.
The resulting machine is a DFA over , and it recognizes exactly the language of words over that avoid every factor in .
Facts & Assumptions
Given: A finite alphabet and a finite nonempty set of nonempty words over .
The set consists of the words that avoid and are proper prefixes of words in ; it is finite, and , by Finite words, contiguous factors, avoidance and proper-prefix states.
In the published prefix automaton, if still avoids then the edge labelled from goes to the longest suffix of that lies in ; if contains a forbidden factor, the letter is rejected, by The longest-suffix prefix automaton for a finite set of forbidden factors.
A word is accepted by a DFA exactly when the final state lies in the accepting set, by Acceptance of a word by a DFA and the recognized language.
Proof
Define to have state set , start state , accepting set , and transition rule By [L1] and [L2], this is a total transition function on a finite state set, so is a DFA.
We prove by induction on the length of a word that the run of from behaves as follows: if avoids , the final state is the longest suffix of belonging to ; if contains a forbidden factor, the final state is . The induction step is exactly the two cases built into the definition of in step 1.1.
If avoids , then step 2.1 places the run in a state of , hence [L3] says that accepts . If contains a factor in , then step 2.1 places the run in , so [L3] says that rejects .
Therefore is exactly the language of words over that avoid every forbidden factor in .
FALSE: a DFA transition diagram may omit a sink without changing totality
Statement
False claim: once a transition diagram has all of its "interesting" edges, one may omit a sink transition and still regard the picture as specifying a DFA.
Facts & Assumptions
Given: The alphabet and a one-state picture with state , start state , and only one drawn edge, a loop .
The statement refuted is: omitting a sink transition from a DFA diagram does not affect whether the diagram defines a total DFA.
A DFA requires a total transition function , by Deterministic finite automata.
Refutation
In the displayed picture, the input pair has a specified next state, namely . But the input pair has no specified next state at all.
Therefore the picture does not determine a total function on , so by [L1] it does not yet define a DFA.
This contradicts the conclusion of [A1]. The omitted transition really matters: one must add a sink or some other specified -transition to obtain a DFA.
FALSE: complementing a DFA complements its transition graph
Statement
False claim: to complement the language of a DFA, one complements its transition graph.
Facts & Assumptions
Given: The one-state DFA with and .
The statement refuted is: complementing a DFA means complementing the transition graph.
The correct complement construction keeps the same transition function and replaces the accepting set by , by Complementing the accepting states complements the recognized language.
A DFA must have exactly one outgoing transition for each input letter from each state, by Deterministic finite automata.
Refutation
By [L1], the complement of is the empty language, obtained by keeping the same looping transitions and changing only the accepting set from to .
If one literally complements the transition graph instead, both loop edges are removed because they were the only edges present. The resulting picture has no outgoing transition on either input letter, so by [L2] it is not even a DFA.
Thus graph complementation does not produce the complement DFA from step 1.1 and does not in general preserve the DFA conditions. The claim [A1] is false.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Jean Gallier and Jocelyn Quaintance, Introduction to the Theory of Computation: Some Notes for CIS511
- John Watrous, Introduction to the Theory of Computing, Lecture 2
- John Watrous, Introduction to the Theory of Computing, Lecture 4
- R. P. Stanley, Enumerative Combinatorics, vol. 1, 2nd ed., Example 4.7.7 and Proposition 4.7.8