Question #177409

Prove the theorem

The elass of regular languages is closed under union operation. In othe words, if Al

and A2 are regular languages, so is (Ai UA2)"for the following languageL-twiw acepts even mumber of 'a' or even number of "b'.


1
Expert's answer
2021-04-02T11:53:39-0400

Prove that for regular languages L1L_1 and L2L_2 that L1L2L_1\lor L_2 is regular.

Let M1=(S1,,δ1,s1,F1)M_1=(S_1,\sum, \delta_1,s_1,F_1) and M2=(S2,,δ2,s2,F2)M_2=(S_2,\sum, \delta_2,s_2,F_2) be DFA for L1L_1 and L2L_2

DFA Construction (the Product Construction):

We claim the DFA M=(S1×S2,,δ,(s1,s2),F)M=(S_1\times S_2,\sum, \delta,(s_1,s_2),F) where

δ((s1,s2),a)=(δ1(s1,a),δ2(s2,a))\delta((s_1,s_2),a)=(\delta_1(s_1,a),\delta_2(s_2,a)) for all s1S1,s2S2s_1\isin S_1,s_2\isin S_2 and aa\isin \sum ,

F=(F1×S2)(S1×F2)F=(F_1\times S_2)\lor (S_1\times F_2)

accepts L1L2L_1\lor L_2

i.e. L(M)=L(M1)L(M2)L(M)=L(M_1)\lor L(M_2) .

Proof of correctness: For every string ww , we have:

δ^((s1,s2),w)=(δ^1(s1,w),δ^2(s2,w))\hat{\delta}((s_1,s_2),w)=(\hat{\delta}_1(s_1,w),\hat{\delta}_2(s_2,w))

δ^((s1,s2),w)F\hat{\delta}((s_1,s_2),w)\isin F iff δ^1(s1,w)F\hat{\delta}_1(s_1,w)\isin F or δ^2(s2,w)F\hat{\delta}_2(s_2,w)\isin F .

L1L2L_1\lor L_2 is regular since there is a DFA accepting this language.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS