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 S → AB | CA, B → BC | AB, A → a, C → aB | b is

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

Show answer & explanation

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

Explanation

Every B-production contains B again, so B never derives a terminal string: B is useless. Removing it (and S → AB, C → aB) leaves S → CA, A → a, C → b.

More Theory of Computation and Compilers questions