Question

Answer the following questions. Draw a DFA representing the regular expression given below. Represent the end of the string with the symbol $ 1. [abcl[123]+X*YM?

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

Symbols used in the expression:

[] : any one character in the enclosed string

+: one or more occurences

*: zero or more occurences

?: zero or one occurrence

q0 : start state

q4, q5 : final states

,2,3 41q0 -> q1 : string should start with a/b/c

q1->q2 and q2 -> q2: there should one more more occurences of 1/2/3

q2->q3, q2->q4 & q3->q4: zero or more occurences of X, so either some X's followed by Y (q2->q3->q4) or directly 1/2/3 followed by Y (q2->q4)

q4->q5: M following Y, zero or one occurence of M, if zero occurence then q4 final state, if one M then q5 final state.

Add a comment
Know the answer?
Add Answer to:
Answer the following questions. Draw a DFA representing the regular expression given below. Represent the end...
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