Computer Science EngineeringHard
Which of the following languages over {a, b} is NOT regular?
- A. a*b*
- B. {a^n b^n | n >= 0}
- C. (ab)*
- D. strings with an even number of a's
Correct answer: B. {a^n b^n | n >= 0}
Matching the count of a's with b's needs unbounded memory, and the pumping lemma rules out regularity.
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
- 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)?
- If both a language L and its complement are recursively enumerable, then L is
- Left recursion must be eliminated from a grammar before it can be used with
- Which parser accepts the largest class of grammars among the following?