4) All are context free. (because all need comparison of m with respect to n)

Dark Mode

213 views

1 vote

Consider the following languages:

$L_1 = \{ a^mb^n \mid m \neq n\}$

$L_2 = \{ a^mb^n \mid m = 2n+1\}$

$L3 = \{ a^mb^n \mid m \neq 2n\}$

Which one of the following statements is correct?

- Only $L_1$ and $L_2$ are context free languages
- Only $L_1$ and $L_3$ are context free languages
- Only $L_2$ and $L_3$ are context free languages
- $L_1$, $L_2$ and $L_3$ are context free languages