694 views
5 votes
5 votes

Let L={ai bj ck ┤|if j is odd then i=k} where i,j,k>0. Which of the following option is true about L?

  1.   L is CSL but not CFL
  2.   L is CFL but not DCFL
  3.   L is regular
  4.   L is DCFL but not regular
     

1 Answer

5 votes
5 votes
L = {$a^ib^jc^k$ | if j is odd then i=k, where i,j,k >0}

This language can be divided into two parts.
i. when j is odd
ii. when j is even

i. L1 = {$a^nb(bb)^*c^n | n>1$}, and this language is DCFL

ii. if J is even then a's and c's can be anything either equal or notequal.
    L2 = {$a^p(bb)^*c^q | p,q >0$}, L2 is Regular

$\text{L = L1 U L2 = DCFL U Regular = DCFL}$

Related questions

2 votes
2 votes
1 answer
1
1 votes
1 votes
2 answers
2
Parshu gate asked Dec 10, 2017
763 views
LC may be CFL LC cannot be CFL LC may be regular LC may or may not be CFL