GATE CS 2017, set 1 · Question 10 · Theory of Computation · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Consider the following context-free grammar over the alphabet Σ = {a, b, c} with S as the start symbol:
S → abScT | abcTT → bT | b
Which one of the following represents the language generated by the above grammar?

  1. (A) {(ab)ⁿ (cb)ⁿ | n ≥ 1}
  2. (B) {(ab)ⁿ cb^(m₁) cb^(m₂) … cb^(mₙ) | n, m₁, m₂, …, mₙ ≥ 1}
  3. (C) {(ab)ⁿ (cbᵐ)ⁿ | m, n ≥ 1}
  4. (D) {(ab)ⁿ (cbⁿ)ᵐ | m, n ≥ 1}
Answer

Answer (B)

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