Given string w such that every odd position in w is a 1
My solution is
The book's solution is
from my understanding $\epsilon$ should not be an accepted state, however in the book's solution it is. How is it handling this case?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.
Sign up to join this communityGiven string w such that every odd position in w is a 1
My solution is
The book's solution is
from my understanding $\epsilon$ should not be an accepted state, however in the book's solution it is. How is it handling this case?
Yes, an empty string is a valid input to a DFA. If this were not the case, DFAs would not be closed under all of the Kleene algebra operations.
In this case, the argument is correct. Think of the problem statement as an implication. If $i$ is an odd position, then $S_i$ is 1.