GATE Computer ScienceVery hardGATE CSE
Decimal numerals are read most significant digit first (empty string = 0, leading zeros allowed). What is the number of states in the minimal DFA for the multiples of 12?
- A. 12
- B. 6
- C. 8
- D. 7
Correct answer: D. 7
Residues r and r + 6 (mod 12) have identical transitions (10r + d mod 12), and only residue 0 accepts. So {1,7}, {2,8}, {3,9}, {4,10}, {5,11} merge while 0 and 6 stay separate: 7 states.
More Theory of Computation questions
- Let L = { w ∈ {a, b} : the third symbol from the right end of w is a }; its minimal complete DFA has 8 states. How many states does the…
- Let L = { a^i b^j c^k : i ≠ j or j ≠ k, i, j, k ≥ 0 }. Which statement is correct?
- A DFA over {a, b} has states 0–3, start 0 and accepting state 3. Transitions: 0 –a→ 1, 0 –b→ 0; 1 –a→ 2, 1 –b→ 0; 2 –a→ 2, 2 –b→ 3; 3 –a→…
- A TM (blank B) has rules: δ(q0,a) = (q1,X,R); δ(q0,Y) = (q3,Y,R); δ(q0,B) = (qa,B,S); δ(q1,a) = (q1,a,R); δ(q1,Y) = (q1,Y,R); δ(q1,b) =…
- Which regular expression (over {a, b}, + means union) generates exactly the strings with an even number of b's?
- The pumping lemma for regular languages states that some length p exists such that every w ∈ L with |w| ≥ p can be split w = xyz with |xy|…