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

Consider the production rules of grammar G:
S → AbB
A → aAb | λ
B → bB | λ
Which language L is generated by G?

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

Show answer & explanation

Correct answer: A. L = {anbm : n ≥ 0, m > n}

Explanation

A gives anbn, then one b, then B gives bk: anbn+1+k, so m > n.

More Theory of Computation and Compilers questions