GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Binary strings are read LSB first (the leftmost symbol is the least significant bit; ε has value 0 and is accepted). The minimal DFA for 'value divisible by 6' has how many states?
- A. 4
- B. 6
- C. 12
- D. 5
Correct answer: D. 5
Reading LSB first, the number is even only if the first bit is 0, so strings starting with 1 form a dead class. The start state is its own class and 3 live classes remain (value mod 3 with the weight of the next bit), giving 5.
More Theory of Computation questions
- A DFA over {0, 1} reads a binary numeral MSB first (leading zeros allowed, ε has value 0) and accepts iff the value ≡ 3 (mod 8). How many…
- L = { w ∈ {a, b} : (na(w) − nb(w)) ≡ 0 (mod 3) and |w| is even }. How many states does the minimal complete DFA for L have?
- Let L = { w ∈ {a, b} : |w| ≥ 3 and the 3rd symbol from the right end equals the last symbol }. How many states does the minimal complete…
- L = { w ∈ {a, b} : the 5th symbol from the right is a AND the 3rd symbol from the right is b } (so |w| ≥ 5). How many states does the…
- L = { w ∈ {a, b} : the 4th symbol from the right is a, OR the 2nd symbol from the right is b }. How many ACCEPTING states does the minimal…
- How many states does the minimal complete DFA have for the set of ODD-length strings over {a, b} that contain neither aba nor bab as a…