Want to clarify and check DFA and NFA attempt

I did following exercise and i want to clarify that did i made something wrong. And cannot figure out how to solve the c th question.

Questions

• Your answer to (b) is alright, but your answer to (a) does not contain a final state... Which states did you mean to be final? Apr 21 '17 at 10:41
• @AsafHaas aah i forgot to add that q1 must be the final state. i forgot to draw that. :) now, how i figure out C Apr 21 '17 at 10:44
• I afraid that your answer for (a) is incorrect... Check for example that the word $w = 111$ is accepted by your automata, but $n_1(w) = 0 \pmod{3}$ Apr 21 '17 at 10:47
• Cross-posted: math.stackexchange.com/q/2244821/14578, cs.stackexchange.com/q/74295/755. Please do not post the same question on multiple sites. Each community should have an honest shot at answering without anybody's time being wasted.
– D.W.
Apr 21 '17 at 16:04

I afraid that your answer for (a) is incorrect... Check for example that the word $w = 111$ is accepted by your automata, but $n_1(w) = 0 \pmod{3}$.
Label the states in your answer to (a) as: $$q_0: n_1(w) = 0 \pmod{3}$$ $$q_1: n_1(w) = 1 \pmod{3}$$ $$q_2: n_1(w) = 2 \pmod{3}$$ and try to figure out for each arrow where it should go, what will be the states of $w$.
In case you want to check the DFA that recognizes the set $\{100w001|w\in\{0, 1\}^*\}$
• I guess the transitions for $q_7$ go into itself? May 1 '17 at 12:35