Computer Science EngineeringVery hard
The language {a^n b^m | n != m} is
- A. regular
- B. context-free but not regular
- C. context-sensitive but not context-free
- D. not recursive
Correct answer: B. context-free but not regular
A nondeterministic PDA can guess whether a's or b's are in excess, but no finite automaton can compare the counts.
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 language denoted by the regular expression empty-set star (the Kleene star of the empty set) is
- The minimal DFA over {a, b} accepting strings whose length is divisible by 3 has how many states?
- Adding extra tapes to a Turing machine
- Savitch's theorem implies that
- If any NP-complete problem is shown to have a polynomial-time algorithm, then
- In a syntax-directed definition, an attribute at a node computed from the attributes of its children is called