GATE / CS ARCHIVE

GATE CSE 2007 / QUESTION 29

Minimal DFA for two modular counts

Theory of Computation · Finite Automata · Full GATE CSE 2007 paper

GATE 2007, Q29 2 marks · MCQ
Report issue

Finite Automata

Question 29, GATE 2007: What is the number of states in a minimum DFA for L={w∈{0,1}*: the number of 0s is divisible by 3 and the number of 1s is divisible by 5}?
Options:
(A) 15
(B) 11
(C) 10
(D) 9
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step through it (2 parts)

1. Approach. Use a product state (i,j) recording the two remainders. On 0 update i modulo 3; on 1 update j modulo 5. Minimality requires distinguishability, not merely constructing a 15-state DFA.

2. Derivation and interpretation. Track the number of zeros modulo 3 and ones modulo 5, giving 3×5=15 states; accept residue (0,0). Every residue pair is reachable. Any two different pairs are distinguished by appending zeros and ones that bring one pair to (0,0), leaving the other nonzero in at least one coordinate. Thus 15 states are necessary and sufficient, A.

Original paper, page 6