1
$\begingroup$

If we were to have a trap state in a DFA and we are converting it to a regular expression, how exactly would I incorporate that into the regex? Let's say our language only accepts a*, and my DFA has a start state/final state with a a loop, and once I get a b it goes into a trap. Would the regex simply be a* meaning we ignore the b?

$\endgroup$
1
  • $\begingroup$ @DavidRicherby write it as an answer so that I can accept it. $\endgroup$
    – Ceelos
    Commented Feb 23, 2014 at 1:58

1 Answer 1

2
$\begingroup$

Yes, since the automaton can never accept after reading a $b$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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