Consider the grammar S → ABCc ∣ Abc BA → AB Bb → bb Ab → ab Aa → aa Which of…

2008

Consider the grammar

S → ABCc ∣ Abc
BA → AB
Bb → bb
Ab → ab
Aa → aa

Which of the following sentences can be derived by this grammar?

  1. A.

    abc

  2. B.

    aab

  3. C.

    abcc

  4. D.

    abbc

Attempted by 42 students.

Show answer & explanation

Correct answer: A

The corrected first line of the grammar is S → ABCc ∣ Abc. For the listed options, use the branch S → Abc. Applying Ab → ab gives S ⇒ Abc ⇒ abc. Therefore, abc can be derived, so Option A is correct.

Explore the full course: Isro