591 views
0 votes
0 votes
number of states in the dfa which accepts the binary strings whose decimal equivalent is divisible by 5 ?
 
since ∊ is not accepted as it doesn't have any decimal equivalent so
initial state cannot be accepting state so to accept 0 (zero) there should be some other state than the initial state .
 
so what will be the answer 5 or 6

1 Answer

2 votes
2 votes
5 states required for it .

state 0: num mod 5=0 or you can say all the numbers divisible by 5 falls here  this is the final state indeed

state 1: num mod 5=1 falls here

state 2: num mod 5=2 falls here

state 3: num mod 5=3 falls here

state 4: num mod 5=4 falls here

 

your query:0 is divisible by 5 so no need to take extra care of it... it falls in the state 0

Related questions

1 votes
1 votes
1 answer
1
kislaya Pant asked May 8, 2018
1,109 views
Ques:- What are the number of final states in minimal DFA, where ∑= {a, b}, if every string starts with “aa” and length of the string is not congruent to 0 (mod 4)....
1 votes
1 votes
2 answers
4
Pooja Palod asked Jan 25, 2016
3,231 views
Find the minimum number of states in the DFA which accept the language of all strings that begin or end with 00 or 11.(a) 6 (b) 7(c) 8 (d) 9