Want to clarify and check DFA and NFA attempt

113 Views Asked by At

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

answers that i got

Answers

2

There are 2 best solutions below

1
On BEST ANSWER

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$.

Here is a NFA for (c):

NFA for (c)

2
On

In case you want to check the DFA that recognizes the set $\{100w001|w\in\{0, 1\}^*\}$

enter image description here