GATE CS 2017, set 2 · Question 40 · Theory of Computation · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Consider the following languages.
L₁ = {aᵖ | p is a prime number}L₂ = {aⁿ bᵐ c²ᵐ | n ≥ 0, m ≥ 0}L₃ = {aⁿ bⁿ c²ⁿ | n ≥ 0}L₄ = {aⁿ bⁿ | n ≥ 1}
Which of the following are CORRECT ?
I. L₁ is context-free but not regular.
II. L₂ is not context-free.
III. L₃ is not context-free but recursive.
IV. L₄ is deterministic context-free.

  1. (A) I, II and IV only
  2. (B) II and III only
  3. (C) I and IV only
  4. (D) III and IV only
Answer

Answer (D)

Answer from the official GATE CS 2017 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes