0

Prove/disprove that language of complement of $L=\{a^mb^n|m\neq n \space, m,n\geq1\}$ is context free over alphabet $\{a,b\}$?


My attempt :

Using pumping lemma $L=\{a^mb^n|m\neq n \space, m,n\geq1\}$ is not regular, But it is context free language.

Complement of $L$,

$\overline{L}=\Sigma^*-L$, it should be context free language as complement of ${a^nb^n}$ is also context free language.

Can you explain in formal way, please?

hululu
  • 4,913

1 Answers1

2

It is true that $\overline L$ is context-free, but that does not help you because the context-free languages are not closed under complement.

So you need a different start.

Hint: Write $L$ as $\{a^mb^n\mid 1\le m<n\} \cup \{a^mb^n\mid 1\le n<m\}$.