Proof of NFA theorem
Proof the theorem that the class of regular languages is closed under union; that is, if L1 is recognized by a NFA and L2 is recognized by a NFA, then L1 υ L2 is recognized by a NFA as well.
Expert
Proof:
Suppose L1 is recognized by NFA A1 = (Q1;Σ; δ1; q1; F1) and L2 is recognized by NFA A2 = (Q2; Σ; δ2; q2; F2).
Construct the NFA A = (Q; Σ; δ; q0; F) where:
Q = Q1 υ Q2 υ {q0} where q0 is not in Q1 or Q2.F = F1 υ F2δ is dened as:
- (q0; ε ) = {q1; q2},- (q0; a) = {} for a ≠ ε- (q; a) = δ1(q; a) for a in Σ υ {ε} and q in Q1- (q; a) = δ2(q; a) for a in Σ υ {ε} and q in Q2
Note: The construction above is nothing but the formal denition of the construction given in the slides for closure of NFAs under union!
We claim that A accepts exactly L1 υ L2. We need to show two directions:if a string is in L1 υ L2 it is accepted by A, and if a string is accepted by A it is in L1 υ L2.
Throughout this argument, we refer to the formal denition of what it means for an NFA to accept, as given in the slides and on page 54 of Sipser.
First, suppose a string ω is accepted by A. Let ω' be a rewriting of ω, with ε's possibly in between letters, and r0.... rn for some n ≥ 0 a sequence of states such that ω' and r0.....rn witness acceptance according to the formal denition of acceptance of an NFA. Then r0 = q0, by the denition of acceptance. Since q0 is not an accepting state of A, we must have n > 0, so there is an r1 with r1 ≡ δ2 (q0; ω'). But by the denition of A, ω' must be either q1 or q2, since there is only one transition out of q0 that can lead to an accepting state.
Give an algorithm that, given a grammar G = (V, Σ, R, S), decides whether the grammar G can derive the empty string.
Describe the theorem that a language L is recognized by a DFA if and only if L is illustrated by a regular expression.
Describe the Strategy of TOC computation box in brief ?
Define the term Regular expressions ?
Explain in detail about Homology Modelling
What do you mean by Formal description of NFA operation ?
Let s1 and s2 be two strings of lengths m and n respectively. By definition, a superstring of s1 and s2 is one which contains s1 and s2 as substrings. Give a dynamic programming algorithm to compute a shortest superstring of t
Define various Terminologies used in TOC ?
I have a problem in NFA-DFA. Can somone give the Proof of the theorem of NFA-DFA equivalence ?
How can we characterize DFA languages ?
18,76,764
1954269 Asked
3,689
Active Tutors
1423621
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!