Q75.Marks: +2.0UGC NET Paper 2: Computer Science 8th Oct 2022
Consider the language L = {anbm ∶ n ≥ 4, m ≤ 3}
Which of the following regular expression represents language L?
1.aaaa*(λ + b + bb + bbb)
2.aaaaa*(b + bb + bbb)
3.aaaaa*(λ + b + bb + bbb)✓ Correct
4.aaaa*(b + bb + bbb)
Solution
From the language L = {anbm ∶ n ≥ 4, m ≤ 3}, we can observe that
In the regular expression, there should be at least 4 a(s).
In the regular expression, there should be at most 3 b(s).
In the regular expression, b(s) should come after a(s), not the other way around.
From the options given above, aaaaa*(λ + b + bb + bbb), there are compulsarily 4 a(s) and then we have a*. After that, we have all possible combinations of b(s), which can be 0 to 3 at max.