A grammar is defined as A → BC B → x⏐Bx C → B⏐D D → y⏐Ey E → z The…

2020

A grammar is defined as

A → BC
B → x⏐Bx
C → B⏐D
D → y⏐Ey
E → z 

The non-terminal alphabet of the grammar is

  1. A.

    {A, B, C, D, E}

  2. B.

    {B, C D, E}

  3. C.

    {A, B, C, D, E, x, y, z}

  4. D.

    {x, y, z}

Attempted by 219 students.

Show answer & explanation

Correct answer: A

To find the non-terminal alphabet, identify all symbols that appear on the left-hand side of the production rules. In this grammar: A, B, C, D, and E are defined on the left side. Symbols x, y, and z appear only on the right side as terminals. Therefore, the non-terminal alphabet is {A, B, C, D, E}.

Explore the full course: Isro