GATE Computer ScienceVery hardGATE CS (PYQ pattern)
L = { w ∈ {a, b}* : any two a's in w are separated by at least two b's, and w ends with b }. How many states does the minimal complete DFA for L have?
- A. 4
- B. 5
- C. 6
- D. 7
Correct answer: B. 5
Adding 'ends with b' to the 4-state separation DFA splits the 'free' state into an accepting version (last symbol b) and a non-accepting start version, giving 5.
More Theory of Computation questions
- L = { w ∈ {a, b} : |w| is even and the last two symbols of w differ }. How many states does the minimal complete DFA for L have?
- L = { w ∈ {a, b} : w contains aab as a substring, or w ends with ba }. How many states does the minimal complete DFA have?
- A DFA over {a, b} has states 0 to 5, transitions 0: a→5, b→5; 1: a→5, b→3; 2: a→1, b→4; 3: a→0, b→1; 4: a→1, b→1; 5: a→5, b→4. Start 0…
- A DFA over {a, b} has states 0 to 5, transitions 0: a→4, b→0; 1: a→1, b→1; 2: a→3, b→2; 3: a→2, b→1; 4: a→5, b→2; 5: a→4, b→5. Start 0…
- A DFA over {a, b} has states 0 to 5, transitions 0: a→2, b→4; 1: a→5, b→1; 2: a→2, b→4; 3: a→4, b→5; 4: a→1, b→1; 5: a→3, b→5. Start 0…
- A DFA over {a, b} has states 0 to 5, transitions 0: a→3, b→3; 1: a→0, b→5; 2: a→2, b→3; 3: a→1, b→5; 4: a→0, b→0; 5: a→3, b→3. Start 0…