CS154
Chris Pollett
Feb 26, 2020
The proof of equivalence of finite automata and regular expressions is due to McNaughton and Yamada (1960).
The regular languages are closed under union, `star`, and concatenation.
Proof. The regular languages are precisely those recognized by DFAs. We have shown in turn that the languages recognized by DFAs are precisely those recognized by NFAs, and these in turn are precisely the languages recognized by regular expression. As the languages of regular expressions are trivially closed under these operations, we get the regular languages are closed under these operations.
Apply the algorithm for converting an NFA to a regular expression to the automata:
Post your solution to the Feb 26 In-Class Exercise Thread.
Theorem. Let `G=(V, T, P, S)` be a right linear grammar. Then `L(G)` is a regular language.
Proof. Let `V={V_0, ldots , V_n}`. Assume `S=V_0`. The alphabet of our NFA will be the set of terminals. The set of states of our NFA will consist of `V_0, ldots, V_n` together with some auxiliary states and the state `F` which will be the unique accepting state. The start state will be `V_0`. The transition function `delta` will be based on the productions of `G`. A production
`V_i -> a_1 ldots a_m V_j` will map to the sequence of states and transitions:
where the unlabelled states are auxiliary states.
A production of the form `V_i -> a_1 ldots a_m` is mapped to a set of transitions:
Given this description of the NFA, one can observe that `V_0 =>^star w` if and only if `delta^star(V_0, w) = F` and so if and only if `w` is accepted by the NFA.
Theorem. If `L` is a regular language, then it is generated by right linear grammar.
Proof. Let `M = (Q, Sigma, delta, q_0, F)` be a DFA for `L`. Assume `Q={q_0, ldots, q_n}` and `Sigma={a_0, ..., a_m}`. Let `G=(V, Sigma, P, S)` be the grammar with `V={q_0, ..., q_n}` and `S= q_0` and where for each transition `delta(q_i, a_j) = q_k` we have the production `q_i -> a_jq_k` and if `q_k` is in `F` we also have the production `q_k -> epsilon`. It is not hard to see that `w` is accepted by `M` iff it is generated by this right linear grammar.
Regular Grammars and the equivalences between their languages and the regular languages is due to Chomsky and Miller. Information and Control. Vol. 1. 1958. pp 91--112.