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 language L = {anbm : n ≥ 4, m ≤ 3}. Which regular expression represents L?

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

Show answer & explanation

Correct answer: C. aaaaa*(λ + b + bb + bbb)

Explanation

aaaaa* = aaaa·a* gives at least four a's, and (λ + b + bb + bbb) gives 0–3 b's. aaaa* allows only three a's.

More Theory of Computation and Compilers questions