Home » Theory of Computation » Theory of computation miscellaneous » Question

Theory of computation miscellaneous

Theory of Computation

  1. Consider the following languages over the alphabet ∑ = {a, b, c}.
    Let L1 = { an bn cm | m , n ≥ 0 } and L2 = { { am bn cn | m , n ≥ 0 }
    Which of the following are context-free languages?
    I. L1 ∪ L2
    II. L1 ∩ L2
    1. I only
    2. II only
    3. I and II
    4. Neither I nor II
Correct Option: A

The given language over Alphabets ∑ = (a, b, c) and the given language are :-
L1 = { an bn cm | n , m ≥ 0 } is a CFL
L2 = { am bn cn | n , m ≥ 0 } is also a CFL
then union of two CFL is always CFL,
L1 ∪ L2 = { an bm ck | (n = m) or (m = k), n , m ≥ 0 } is a context free language.
Intersection of two CFL is may or may not be a context free language.
L1 ∩ L2 = { an bm ck | (n = m) or (m = k) n , m ≥ 0 } or { an bn cn | n ≥ 0 } is a non context free language.
Hence, option (a) is correct.



Your comments will be displayed only after manual approval.