GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Let L be the set of binary strings (MSB first, ε counted as 0 and accepted) whose value is divisible by 3; its minimal DFA has 3 states. Let h(a) = 1, h(b) = 01. How many states does the minimal DFA for the inverse homomorphic image h⁻¹(L) = { w ∈ {a, b}* : h(w) ∈ L } have?
- A. 6
- B. 4
- C. 3
- D. 9
Correct answer: C. 3
Simulate L's DFA over the images: a acts as v → 2v + 1 and b as v → 4v + 1 on remainders mod 3, giving a DFA with the same 3 states (an inverse homomorphism never needs more states than the original DFA).
More Theory of Computation questions
- Let L = { binary strings (MSB first, ε accepted) whose value is divisible by 5 }, with a minimal DFA of 5 states. For h(a) = 1 and h(b) =…
- Let L₁ = { w ∈ {a, b} : |w| ≡ 0 (mod 4) } and L₂ = { w : (na − nb) ≡ 0 (mod 4) }. The minimal complete DFA for L₁ ∪ L₂ has how many…
- Let L₁ = { w ∈ {a, b} : na(w) ≡ 0 (mod 4) } and L₂ = { w : |w| ≡ 0 (mod 6) }. The minimal complete DFA for L₁ ∩ L₂ has how many states?
- Let L₁ = { w ∈ {a, b} : na(w) is even } and L₂ = { w : |w| is even }. The minimal complete DFA for L₁ ∩ L₂ has how many states?
- Over {0, 1} (MSB first, ε counted as 0), L = { w : w is divisible by 5 and w contains 11 as a substring }. How many states does the…
- How many strings of length 6 over {a, b} contain both ab and ba as substrings?