Let L1 be the language defined over alphabet ∑={a b} that contains all strings starting with alphabet a. (Example strings abbababa, aaaab, abaabbbb)
R.E = a(a+b)*
F.A 1
2nd diagram (a,b)
Let L2 be the language defined over alphabet ∑={a b} that contains all strings in which alphabet a comes in the string in even number. (Example strings aba, bbabaaab, abaabba)
R.E = b*(ab*a)*b*
F.A 2
Construct the corresponding FAs of above languages. Construct the transition table for the intersection of above regular languages and a corresponding transition diagram for (FA1∩FA2).
Transition Table
Old States New States After Reading
A B
Z1 (p,1) (q,2) Z4 (r,1) Z5
Z2 (p,2) (q,1) Z3 (r,2) Z6
Z3 (q,1) (q,2) Z4 (q,1) Z3
Z4 (q,2) (q,1) Z3 (q,2) Z4
Z5 (r,1) (r,2) Z6 (r,1) Z5
Z6 (r,2) (r,1) Z5 (r,2) Z6
(FA1∩FA2)
No comments:
Post a Comment