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
- Let 1 and 2 be languages over represented by the regular expressions (a∗ + b)∗ (a + b)∗ and respectively. Which of the following is true wi…
- Which of the following statements is true?
- Which of the following is not an intermediate code form?
- Which of the following are applications of symbol table? (A) Storage allocation (B) Checking type compatability (C) Suppressing duplicate e…
- Let G1 and G2 be arbitrary context-free grammars and R an arbitrary regular language. Which problems are undecidable? (A) Is L(G1) = L(G2)?…
- Consider L1 = {a^(z²) | z is an integer}, L2 = {a^(2z) | z ≥ 0}, L3 = {ωω | ω ∈ {a, b}*}. Which of the languages is (are) regular?