GATE Computer ScienceModerateGATE CSE
An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting state 3. Transitions: δ(0,a) = {0,1}, δ(0,b) = {0}, δ(1,a) = δ(1,b) = {2}, δ(2,a) = δ(2,b) = {3}, and state 3 has no transitions. How many states does the subset-construction DFA have if only reachable subsets are built (the empty set counts if reached)?
- A. 7
- B. 9
- C. 16
- D. 8
Correct answer: D. 8
State 0 is always present; states 1, 2, 3 are present exactly when the last, second-last and third-last symbols were a. All 8 combinations are reachable and the empty set never occurs: 8 subsets.
More Theory of Computation questions
- How many strings of length 7 over {a, b} belong to the language of the regular expression (a + bb)(b + ε)?
- The grammar S → aSb | SS | ab generates how many distinct strings of length 6?
- Which of the following problems is decidable for the given input? I. Is the language of a given context-free grammar empty? II. Are two…
- Which of the following languages over {a, b} is context-free but not regular?
- A grammar in Chomsky normal form (no ε-productions) is used to derive a string of length 9. How many derivation steps (production…
- Over {a, b}, L = { w : |w| ≥ 3 and the third symbol from the right end is a }. What is the number of states in its minimal complete DFA?