in Theory of Computation retagged by
376 views
2 votes
2 votes

Suppose L1 = CFL and L2 = Regular, We are to find out whether L1 – L2 = CFL or non CFL.

I have 2 approaches to this question and I am confused which is wrong:

  1. L1 – L2 = L1 intersection L2’ 
    1. L2 being Regular L2’ is also Regular so CFL intersection Regular = CFL
    2. L2 being Regular L2’ is also Regular and every Regular Language is also CFL so CFL intersection CFL = non CFL.

Can somebody please clarify my doubt?

in Theory of Computation retagged by
376 views

4 Comments

Thanks a lot Sir
0
0
In the second case, we are talking about all those CFLs which are regular.
1
1

@Vishal_kumar98 Thanks yes this would mean ultimately doing RL intersection CFL = CFL.

1
1

Please log in or register to answer this question.

Related questions