566 views
0 votes
0 votes
is union of regular language and context free language always regular?

1 Answer

1 votes
1 votes
Suppose there are two CFL's L1 and L2. $\because$ they are CFL's they have equivalent CFG's. They have a start symbol as well, say S1 and S2. Now create a new production S->S1|S2. As you can see now you have a grammar for the language $L1\cup L2$ of two languages. Therefore you have a CFL for it as well. You also know that every regular language is also context free. Therefore union of regular and context free languages is closed under union.

Related questions

3 votes
3 votes
2 answers
1
1 votes
1 votes
2 answers
2
Parshu gate asked Nov 29, 2017
850 views
Suppose in question we are given the language is Turing Recognizable , can I consider it a CFL or Regular?
0 votes
0 votes
0 answers
3