All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · November 2020

Let L = L₁ ∩ L₂, where L₁ = {0ᵐ1ᵐ2 0ⁿ1ⁿ | m, n ≥ 0} and L₂ = {0ᵐ1ⁿ2ᵏ | m, n, k ≥ 0}. Then L is

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

Show answer & explanation

Correct answer: C. Context free but not regular

Explanation

L₂ allows no 0s or 1s after a 2, so the intersection forces n = 0: L = {0ᵐ1ᵐ2 | m ≥ 0}. That is context-free but not regular.

More Theory of Computation and Compilers questions