GATE Computer ScienceEasyGATE CS (PYQ pattern)
Which of the following productions cannot appear in a context-sensitive (non-contracting) grammar?
- A. AB → CD
- B. aAb → aaab
- C. AB → a
- D. A → BCD
Correct answer: C. AB → a
Non-contracting grammars require the right side to be at least as long as the left side; AB → a shrinks the sentential form (type 0 only).
More Theory of Computation questions
- A grammar has productions S → aS | bA | ε; A → aA | b. Which is the most restricted class of the Chomsky hierarchy that the grammar…
- Which of the following statements are correct? I. Every context-free language over a one-letter alphabet is regular. II. { a^(2ⁿ) : n ≥ 0…
- Let A = { ⟨M⟩ : the Turing machine M accepts at most one string }. Which statement is correct?
- Which of the following statements about the Post Correspondence Problem (PCP) are correct? I. PCP restricted to a one-letter alphabet is…
- To prove by the pumping lemma for context-free languages that L = { w w : w ∈ {a, b} } is not context-free, which string (p is the pumping…
- Which of the following statements are correct? I. Every regular language has an unambiguous context-free grammar. II. Every context-free…