Question

Question 5. Let Σ = {a, b}, and consider the language L = {a n :...

Question 5. Let Σ = {a, b}, and consider the language

L = {a n : n is even} ∪ {b n : n is odd}.

Draw a graph representing a DFA (not NFA) that accepts this language.

Question 6. Give a brief description of the language generated by the following production rules.

S → abc

S → aXbc

Xb → bX

Xc → Ybcc

bY → Yb

aY → aa

aY → aaX

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

Ans 5 :

L = {a n : n is even} ∪ {b n : n is odd}.

In the language given above we can see that it will contain either all a's as even of all b's as odd.

So, starting from the initial state q0 we can either to the way in which even number of a's are found or where the odd number of b's are found. The DFA for such a language is given below.

Add a comment
Know the answer?
Add Answer to:
Question 5. Let Σ = {a, b}, and consider the language L = {a n :...
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