Question

1. Given the following FAs for the languages ta) and b): a,b a,b construct the FA that is produced for the language ta) fb). Show the transition table and draw the transition diagram [Hint: This is NOT the simplest FA for the language ta, bl. (8 points) convert your FA from problem 1 (an FA is also a TG) into a regular expression show the steps that you take). (4 points)

Theory of Computation. Please show all work.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

for lang a the trans table

a b
-x1(start state) +x2 x3
+x2 x3 x3
x3 x3 x3

for lang b the tran table

a b
-y1 y3 y2
+y2 y3 y3
y3 y3 y3

we have to cmbine these table.for combining follow the steps

1st step: Design DFA for both languages and name their state Q0, ...

2nd step : Rename every state in both DFA i.e. rename all states in DFA as Q0 , Q1 , Q2 , Q3 , ... assuming you have started with subscript 0 that means none of the state have same name

3rd Step: construct transition table(?) by using following steps

   3a. Take start state of both DFA(DFA1 , DFA2) and name them as Q[ i , j ] where i is subscript of start state of 1st DFA and j is subscript of start state of 2nd DFA . i.e. Qi is start state of 1st DFA and Qj is start state of 2nd DFA and mark Q[i , j]as start state of combined DFA.

   3b. Map state of both DFA as
           if ?(Qi,ak) = Qp1 and ?(Qj,ak) = Qp2 , where Qp1 belongs to DFA1 and Qp2 belongs to DFA2 then ?(Q[ i , j ] , ak) = Q[p1,p2]

   3c. fill entire table while there is any Q[i,j] remaining in transition table.

4th step: Construct final state table

For AND case final state would be all Q[i , j] where Qi and Qj is final state of DFA1 and DFA2.
For OR case final state would be all Q[i , j] where Qi or Qj is final state of DFA1 and DFA2.

5th step: Rename all Q[i , j] (uniquely) and draw DFA this will be your result .

when combining the tran table will be

a b
Q[-x1,-y1] Q[+x2,y3] Q[x3,+y2]
Q[-x1,+y2] Q[+x2,y3] Q[x3,y3]
Q[-x1,y3] Q[+x2,y3] Q[x3,y3]
Q[+x2,-y1] Q[x3,y3] Q[x3,+y2]
Q[+x2,+y2] Q[x3,y3] Q[x3,y3]
Q[+x2,y3] Q[x3,y3] Q[x3,y3]
Q[x3,-y1] Q[x3,y3] Q[x3,+y2]
Q[x3,+y2] Q[x3,y3] Q[x3,y3]
Q[x3,y3] Q[x3,y3] Q[x3,y3]

by combining the table will be formed in this way.

rename the states as

Q[-x1,-y1] asQ0

Q[-x1,+y2]asQ1

Q[-x1,y3]asQ2

Q[+x2,-y1]asQ3

Q[+x2,+y2]asQ4

Q[+x2,y3]asQ5

Q[x3,-y1]asQ6

Q[x3,+y2]asQ7

Q[x3,y3]asQ80 Ca

where Q0 is the intial state

and the reg exp is

a(ab)ab*+a(ab)ab*+a(ab)*+ab(ab)*+a(ab)*+ab(ab)*+ab(ab)*+a(ab)*+ab(ab)*+b(ab)ab*+b(ab)ab*+b(ab)ab*

Add a comment
Know the answer?
Add Answer to:
Theory of Computation. Please show all work. Given the following FAs for the language {a} and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT