Going from DFA to NFA

28 Views Asked by At

I am trying to solve this problem but not quite sure if I have it right as I don't have too much practice with NFA.

Give a pattern matching DFA for the pattern P = abaabaaa. Also give a simpler NFA for the same pattern.

I have my DFA below: https://i.stack.imgur.com/qZAfb.jpg

But I am having problem coming up with an NFA since I don't have much practice with those, my thinking is that a,b will loop at q0 until it sees abaabaaa and then get accepted. so q0 will have a,b looping and the rest of the states would lead straight to the accepting state without any other variable.