5,377 views
0 votes
0 votes

Give minimal DFA that performs as a MOD-3 1's counter,i.e outputs a '1' each time the number of 1's in the input sequence is a multiple of 3.

1 Answer

2 votes
2 votes

Design a (normal) DFA that accepts strings, over {$0,1$}, that ends with $111$.

Now Look at DFA, $q_3$ is a state where we get a sequence in which no of $1's$ is multiple of $3$. so whenever we reach $q_3$ we get output $1$.

We can design Mealy machine for it , by getting output $1$ on the incoming edges on state $q_3$, and output $0$ at all others.

Or, We can design Moore machine, by putting output $1$ on the state $q_3$ and output $0$ on others.

Related questions

0 votes
0 votes
0 answers
2
0 votes
0 votes
0 answers
3
0 votes
0 votes
2 answers
4
jaiganeshcse94 asked Aug 22, 2016
1,059 views
construct a minimal DFA for the following language ,Set of all strings which start and end with same symbol