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
- A.
{A, B, C, D, E}
- B.
{B, C D, E}
- C.
{A, B, C, D, E, x, y, z}
- 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}.