NFA Containing 'a'

59 Views Asked by At

I have L={Contains 'a'} and Alphabet(E)={a,b}

Can i create a NFA Like this

enter image description here

1

There are 1 best solutions below

14
On BEST ANSWER

Any non-empty string winds up in Q2 and stays there, so you match more than you should. For example, $bbb$ is accepted even though it's not in $L$.

The initial state should keep reading input until $a$ is read, and the other one should be the accepting state and just consume the rest of the input by looping any input to itself.