II. L1' is context-free.
III. L1-R is context-free.
IV. L1 ∩ L2 context-free.
Correct : R
Given:
L1 and L2 are context-free languages (CFLs).
R is a regular language.
To find:
Which of the given statements are correct.
Solution:
Let me check statement I first.
Statement I says: L1 ∪ L2 is context-free.
I know that context-free languages are closed under union, so this statement is true.
Now let me check statement II.
Statement II says: L1' is context-free.
CFLs are not closed under complementation, so L1' is not necessarily context-free.
Thus, statement II is false.
Now checking statement III.
Statement III says: L1 - R is context-free.
I can rewrite set difference as: L1 - R = L1 ∩ R'
Since regular languages are closed under complement, R' is also a regular language.
Also, the intersection of a CFL and a regular language is always a CFL.
So, L1 ∩ R' is context-free, which means statement III is true.
Now checking statement IV.
Statement IV says: L1 ∩ L2 is context-free.
CFLs are not closed under intersection, so this is not necessarily context-free.
Thus, statement IV is false.
So only statements I and III are correct.
Answer: (B) I and III only
Similar Questions
Total Unique Visitors