GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Which of the following statements are correct? I. Every context-free language over a one-letter alphabet is regular. II. { a^(2ⁿ) : n ≥ 0 } is context-sensitive but not context-free. III. If L ⊆ {a, b}* is context-free, then { a^|w| : w ∈ L } is regular. IV. Every context-sensitive language over a one-letter alphabet is regular.
- A. I and II only
- B. I and III only
- C. I, II, III and IV
- D. I, II and III only
Correct answer: D. I, II and III only
I is Parikh's theorem specialised to one letter (semilinear = eventually periodic). II: a^(2ⁿ) is not regular, so by I it is not context-free, yet an LBA can decide it. III: the image under h(a) = h(b) = a of a CFL is a unary CFL, hence regular by I. IV is false: II is a counterexample.
More Theory of Computation questions
- 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…
- Rice's theorem cannot be applied directly to which of the following properties of a Turing machine M (although some of them are…
- If a language L and its complement are both recursively enumerable, then L is