GATE Computer ScienceEasyGATE CS (PYQ pattern)
Which of the following languages is context-sensitive but NOT context-free?
- A. { aⁿbⁿcⁿ : n ≥ 1 }
- B. { aⁿbⁿcᵐ : n, m ≥ 1 }
- C. { aⁿbᵐ : n ≠ m }
- D. { w wᴿ : w ∈ {a, b}* }
Correct answer: A. { aⁿbⁿcⁿ : n ≥ 1 }
aⁿbⁿcⁿ fails the CFL pumping lemma but is accepted by a linear bounded automaton. The other three are context-free.
More Theory of Computation questions
- An ε-NFA has 6 states. When it is converted to a DFA by the subset construction, what is the maximum possible number of states in the…
- A grammar in Chomsky normal form (no ε-productions) derives a string of length 15. Let N be the number of derivation steps and H the…
- A grammar in Greibach normal form generates a string of length 15. How many derivation steps does any derivation of it take?
- A grammar has only rules of the forms A → BC, A → BCD (three variables) and A → a. A parse tree of a string of length 9 uses exactly two…
- Which of the following computational models is strictly LESS powerful than a standard single-tape deterministic Turing machine?
- Which of the following problems for a linear bounded automaton (LBA) M and a string w is decidable?