# Designing a NFA that accept the set of strings that contain an even number of substrings 01

I'm new in theory of computation. Here {0,1} set of input symbols. I tried to make the NFA from L(M)= set of all accepted strings, but unable to complete it. Can someone give some hints that how should I attack this problem? . It will be very helpful.

• The last symbol seen (either $$0$$, $$1$$, or blank).
• The parity of number of occurrences of $$01$$ seen so far.
Maintaining the last symbol seen is easy. If the last symbol seen is $$0$$ and the current symbol is $$1$$, then you flip the parity of number of occurrences of $$01$$. A state is accepting if the parity of number of occurrences of $$01$$ seen so far is even.