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.

 

E

Expert

Verified

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 de ned 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 de nition 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 de nition 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 de nition of acceptance of an NFA. Then r0 = q0, by the de nition 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 de nition of A, ω' must be either q1 or q2, since there is only one transition out of q0 that can lead to an accepting state.

   Related Questions in Theory of Computation

©TutorsGlobe All rights reserved 2022-2023.