Is this possible to create with a finite state machine?
So like 101 is accepted because odd number of 0's but 1001 is rejected because even 0's
11 is not accepted because 0 is even.
etc etc.
Is this possible to create with a finite state machine?
So like 101 is accepted because odd number of 0's but 1001 is rejected because even 0's
11 is not accepted because 0 is even.
etc etc.
Yes and it's easy to do it with only two states representing even number of 0's and odd number of 0's respectively:
The accepted state is 2