398 views
2 votes
2 votes

Hi, I am having a doubt understanding the result of CFL – Regular:

Here’s my approach:

  1. CFL – Regular = CFL INTERSECTION Regular’ = CFL INTERSECTION Regular = CFL
  2. Suppose some CFL L1= {a^n b^n | n>=1} and some Regular R1= (a+b)* : 

Now if I do CFL – Reg = {ab,aabb,aaabbb, ….} – { epsilon, a, b, ab, aabb, aaabbb, …..} 

It gives { phi } which is Regular (hence also CFL)
 

So is it better to say CFL – Regular = Regular or CFL – Regular = CFL ? If both are separate options, which one should I go for? Thanks

 

2 Answers

0 votes
0 votes
CFL. Because a regular language is also a context free language, as you can make a context free grammar from the D.F.A of the corresponding regular language.

Related questions

0 votes
0 votes
0 answers
1
1 votes
1 votes
1 answer
2
3 votes
3 votes
1 answer
3
0 votes
0 votes
0 answers
4