1,339 views
0 votes
0 votes
The minimal finite automata accepting the set of all strings over {0,1} starting with a 1 that interpreted as the binary representation of an integer are congruent to 0 modulo 5 has ______ states.

The ans is 7 but according to me modulo n has 5 states .?

1 Answer

1 votes
1 votes
Binary number interpreted as integer and you want  0 modulo 5, then we need 5 states. But as question is saying starting from 1, we add a new state which on input 1 will point to remainder 0 state of our mod 5 dfa and on 0 will go to dead state. So total 7 states.(5 states for mod 5 counting and 2 more for handling starting with 1 condition. )
edited by

Related questions

0 votes
0 votes
0 answers
1
3 votes
3 votes
2 answers
4