482 views
3 votes
3 votes

1. L={ai bj ck | k=max{i,j}}

2. L={0n 1m | mn2}

3. L={0n 1m | mn2}

4. {0n 1m |mn, m2n, m3n}
5. {ai bj ck| ij or jk or ik}
6. {0,1}*-{(0n 1)n | n1}
7. {ai bj | 2i=3j}

8. if L is regular then Lc={xz | (y)[|x|=|y|=|z|, xyzL]} is??

9. L={0,1}*-{(0m 1m)n | m,n1}

 

1 Answer

0 votes
0 votes

1) L={aibj ck | k=max{i,j}} is not CFL. As it not satisfying prefix property

2) Not CFL.

L={0n 1m | mn2}

Cannot draw PDA for it

3)Not CFL.

L={0n 1m | mn2}

Same as previous

4)Yes CFL.

{0n 1m |mn, m2n, m3n}  

Here 3 condition satisfying in a CFL

5)Yes it is NCFL

{ai bj ck| ij or jk or ik} union of CFL are NCFL

6) Not CFL

L={0,1}*-{(0n 1)n | n1}

(0n 1)n cannot be done in one stack

7)Yes it is CFL.

L={ai bj | 2i=3j}

S->aaSbbb/aabbb

8)Yes CFL.

 Lc={xz | (y)[|x|=|y|=|z|, xyzL]} ,

Here L=xnynz i.e. CSL.

Now Lc=(x+y+z)* - xnzn = {xiyjzk | i!=k}

9) Not CFL. L={0,1}*-{(0m 1m)n | m,n1} =regular - CFL

                                                                    =regular ⋂ (CFL)'

                                                                   = regular ⋂ recursive = recursive

Related questions

5 votes
5 votes
2 answers
3
gatecse asked Sep 12, 2014
1,972 views
Which of the following languages are CFL?$$L_1= \left \{ 0^n 1^m \mid n \leq m \leq 2n \right \} \\[1em] L_2 =\left \{ a^i b^j c^k \mid i=2j \text{ or } j=2k \right \}$$