# DFA for even number of 1's

My attempt at solution-:

Solution by a teacher-:

Both are giving same answer, is the one that I made correct?

• Your DFA doesn't accept $\epsilon$, whilst your teacher's does accept it Oct 31 '21 at 10:58
• ah makes sense, attention to detail. thanks. Oct 31 '21 at 11:08
• There are infinitely many DFAs accepting any given regular language. However, there is a unique minimal DFA. Oct 31 '21 at 11:50
• We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher.
– D.W.
Oct 31 '21 at 22:40

Note that if $$L$$ is regular, then infinitely many DFAs accept $$L$$. There is no unique answer for "DFA that accepts $$L$$". However, there is a canonical answer: there is a unique DFA with the minimum number of states that accepts $$L$$, known as the minimal DFA. Your teacher drew the minimal DFA for your language.