# test series

146 views
L1 = {a^mb^nc^p | m ≥ n or n = p}
L2 = {a^mb^nc^p | m ≥ n and n = p}

(a) Both are NCFL’s
(b) L1 is DCFL and L2 is NCFL
(c) L1 is NCFL and L2 is not context-free
(d) Both are not context-free
Solution: Option (c)

how it is possible plz explain indetail

edited
0
Option c and d are same right? :o
0
nope
0
Both the options say that they L1 and L2 are ncfls.
0
option c says L1 is non determinstic context free language and L2 is determinstic cfl

option d says both L1 and L2 are non cfl
0
L1 NCFL

L2 CSL
0
plz explain brifely
0

L1 requires only one comparission at a time ===>CFL, due to Ambiguity it is Non-Deterministic CFL

L2 requires two comparissions at a time ===> CSL

0
Oh yes..sorry .I read it wrongly..

Option C says L1 is ncfl and L2 is not CFL
0
How L1 becomes NCFL? can anybody give PDA for it?
1

There are two possibilities

1) m>=n                                  2) n=p

For 1) first push a then pop 1 a for each b. Since m>=n so it might happen that there are still some a's left after all b's are exhausted.

For the remaining c's we don't need to do anything

For 2) Do nothing when we get a and push all b's and pop each b for each c.

1
Thanks @MNIPanda, I really appreciate your help.

## Related questions

1 vote
1
175 views
$\left \{ a^{n}.b^{n+k}\mid n\geq 0,k\geq 1 \right \}\cup \left \{ a^{n+k}.b^{n}\mid n\geq 0,k\geq 3 \right \}$ is DCFL Is it true? As we know union of two DCFL cannot be DCFL
$L={{0^{l}1^{m}0^{l+m}| l, m\geq 0}}$ Is it DCFL? Explain?
$L1 =\left \{ a^{m} b^{n} c^{p} | \left ( m \geq n \right )\text{or} \left ( n = p \right ) \right \}$ $L2 =\left \{ a^{m} b^{n} c^{p} | \left ( m \geq n \right )\text{and} \left ( n = p \right ) \right \}$ $(a)$ Both are NCFL’s $(b)$ L1 is DCFL and L2 is NCFL $(c)$ L1 is NCFL and L2 is not context-free $(d)$ Both are not context-free