0
$\begingroup$

Need to construct a DFA automation that recognizes the following language of strings over the alphabet {a,b}: The set of all strings that contain the pattern baa and end with b. (So, for example, your automaton should accept the string abaab and reject the string abaa.) This is what i came up with but does not do the job completely I think or what?

enter image description here

$\endgroup$
1
$\begingroup$

In your drawing, 'b' should go from '2' to '1', and 'a' from '4' to '3'. Then if the automaton ends on '4' you win and if it ends on '3' you lose.

$\endgroup$
  • $\begingroup$ How would you write this as regular expression. (a|b)+(baa)a*b – $\endgroup$ – user1732558 Feb 16 '15 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.