DFA for odd a's and even a's?? When to accept empty string??

210 Views Asked by At

I am trying to understand these two machines separately, DFA1(Accepting only odd number of 0’s) and DFA2 (Accepting only even number of 1’s). DFA1 doesn't accept empty string but DFA2 accepts empty string as well...?? Shouldn't both DFA's be accepting empty string?

1

There are 1 best solutions below

0
On

Question: What is the number of occurrences of $0$ in the empty word?

Answer: $0$.

Question: is $0$ an odd number?

Answer: no.

Thus the empty word does not belong to the language of all words having an odd number of occurrences of $0$.