GATE Computer ScienceVery hardGATE CSE
Let L = { w ∈ {a, b}* : (|w|_a + 2·|w|_b) mod 12 ∈ {1, 5, 9} }, where |w|_a and |w|_b count the a's and b's. What is the number of equivalence classes of the Myhill–Nerode relation of L (the number of states of its minimal DFA)?
- A. 12
- B. 4
- C. 6
- D. 8
Correct answer: B. 4
Only v mod 4 matters for acceptance after any extension, since 12 is a multiple of 4 and the accepting set is a full residue class mod 4: classes = 4.
More Theory of Computation questions
- Consider these problems: (a) Given a DFA M, is L(M) empty? (b) Given two CFGs G₁, G₂, is L(G₁) ∩ L(G₂) = ∅? (c) Given a TM M and input w…
- How many of the following statements are true? (i) DCFLs are closed under complement. (ii) CFLs are closed under intersection with a…
- Among the six languages L₁ = {aⁱbʲcᵏdˡ : i = k and j = l}, L₂ = {aⁱbʲcᵏ : i = j or j = k}, L₃ = {wwᴿ : w ∈ {a,b}}, L₄ = complement of…
- A DFA reads a binary string least-significant bit first (so the first symbol read is the 2⁰ bit) and must accept exactly the strings whose…
- How many strings of length at most 6 (the empty string included) over {a, b} belong to L(aba)?
- An ε-NFA over {a, b} has states 0–4, start 0, accepting state 4. Moves: 0 –ε→ 1; 0 –a→ {0,1}; 1 –b→ 2; 2 –ε→ 3; 3 –a→ {3,4}; 4 –b→ 2. How…