142 views

Suppose that L is Context free and R is Regular.

• $A$)  $L – R$ is necessarily Context free
• $B$)  $R – L$ is necessarily Context free

Which of the above statement/s is/are true?

retagged | 142 views
+1
is it only $A$ ?
+3
Yes, and 2nd one is false for CFL and even RE but not for others.
+2
^yes.

A) True

B) False ( not necessarily), because CFL is not closed under complementation. R-L = R INTERSECTION L'
+1
if L is DCFL , then B) is also true.

As DCFL closed under complement
0
@kapil u meant R-L is not R.E when L is RE right ? and true when L is recursive right ?
0
If possible pease support ur answer with an example. It'll be helpful indeed. :)

+1 vote
1) It's closure property. CFL is closed under Regular difference (Even every language is closed under regular difference).

2) R-L is not any standard thing , we have to do calculations to know about this so we can't say anything.
by Boss (14.6k points)

1
2
3