Computer Science EngineeringModerate
How many states are in the minimal DFA over {a, b} that accepts exactly the strings ending in 'ab'?
- A. 2
- B. 4
- C. 3
- D. 5
Correct answer: C. 3
Three states are enough: start/no progress, seen 'a', and seen 'ab' (accepting).
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- The regular expression (a+b) over the alphabet {a, b} denotes
- Context-free grammars correspond to which type in the Chomsky hierarchy?
- Which of the following languages over {a, b} is NOT regular?
- An NFA has 5 states. By subset construction, the equivalent DFA needs at most how many states?
- Context-free languages are NOT closed under which operation?
- Which of the following languages requires a nondeterministic pushdown automaton (cannot be accepted by a deterministic PDA)?