Q54.Marks: +2.0UGC NET Paper 2: Computer Science 2020
Consider L = L1 ∩ L2
Where L1 = {0m1m20n1n |m, n >= 0}
L2 = {0m1n2k | m, n, k ≥ 0}
Then, the language L is
1.Recursively enumerable but not context free
2.Regular
3.Context free but not regular✓ Correct
4.Not recursive
Solution
The correct answer is option 3.
Key Points
L1 will first contain 0's followed by an equal number of 1's. After that, there will be a single 2 which will again be followed by 0's and an equal number of 1's i.e. L1={2,012,00112,20011,01201,0011201,0120011,001120011,........}