4 should be the minimum number of states: (even, even) which is final and starting state denoting zero a and b. (even, odd) for even a and odd b. (odd, even) for odd a and even b. (odd,odd) for odd a and odd b.

Suppose L is a regular language of all a's and b's where the number of a's is divisible by m and the number of b's is divisible by n. If M is the minimal DFA accepting language L, then what is the number of states in M ? Is it nm or (n+1)(m+1) ?

Ques:- Let β= {0, 1} What will be the number of states in minimal DFA, if the Binary number string is congruent to (mod 8)? *[ Can anybody explain this as I am getting 8 states for this since remainders will be 8 (0,1,2,3,4,5,6,7). But the answer is 4].