670 views
3 votes
3 votes
L1={a^n b^n c ^m|m>=0 and n>=0}

L2={a^m b^ n c^ n|n>=0 and m>=0}

If L3=L1UL2 then how many of L1,L2,L3 are context free languages?

A)1 (B)2 (C)3 (D) none

Answer given option C.

Please explain?

2 Answers

Best answer
3 votes
3 votes
Answer is C.



Explaination:

L1 is Context Free Language as We can construct a PDA for it easily. Push 'a' then pop 'a' for every 'b' and no need to consider  'c'.

L2 is also Context Free Language. Dont consider 'a'. Push 'b' and pop 'b' for every 'c'.

L3 is also context Free as CFL is closed under Union, Concatenation And Kleene Closure.

As L2 and L3 are CFL. L1 will be CFL.
selected by

Related questions

1 votes
1 votes
0 answers
2
1 votes
1 votes
1 answer
3
sim1234 asked Dec 26, 2018
707 views
Assuming that a pointer take 4 bytes and the size of an integer is 2 bytes. What is the size of the *a in declaration: int (*a) [10] ? 4802040
0 votes
0 votes
0 answers
4
sim1234 asked Dec 21, 2018
715 views
Suppose R is a table with 4 attributes A,B, C and D, and S be a table with 3 attributes B, E, F. Now given a particular instance of R and S.S is empty, having no tuples. ...