All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · September 2022

The reduced grammar equivalent to the grammar whose production rules are given below is
S → AB | CA
B → BC | AB
A → a
C → aB | b

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. S → CA, A → a, C → b

Explanation

B can never derive a terminal string (every B-production contains B), so B is useless. Removing it leaves S → CA, A → a, C → b.

More Theory of Computation and Compilers questions