Proof of context free Language

40 Views Asked by At

$$L:=\{w\in\{a, b, c\}^*| ∃ i, j ∈ N :w = a^i⋅b^i⋅c^j ∧ i < j\}$$

I am trying to prove/disprove that this is context free.

I was sure this was not context free, since there are 3 pumping operations, so to speak. So I attempted to prove this using the Pumping Lemma. However, I came across an instance, when I consider $z=a^n⋅b^n⋅c^{n+1}$, and come across an instance where I use $vwx$ of $n$ length and $vwxy=c^{n+1}$, thus $vwx$ pumps more c's. This in turn holds for this instance, since $j>i$.

I have tried to come up with a CF grammar, but have had trouble with this too. Please help! Thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

Just using pumping lemma is okay... please notice that we can not only pump up, but also pump down.

Let $x=a^nb^nc^{n+1}$ such that $n$ is at least the pumping length. So $x=uvwyz$ where $uv^kwy^kz$ are elements in $L$. So we have several cases:

one of $v$ or $y$ consist of $a$ and $b$ or $b$ and $c$: contradiction, consider $k=2$, it is not in $a_ib_jc_k$ format.

$v$ or $y$ consist of only $a$ or only $b$: contradiction, consider $k=2$, the number of $a$ and $b$ will not be equal.

$v$ consists of only $a$ or only $b$, and $w$ consists of only $c$: contradiction again, consider $k=2$, the number of $a$ and $b$ will not be equal.

$v$ consists of only $a$, and $w$ consists only $b$: contradiction again, consider $k=2$, the number of $a$ and $b$ will be no less than that of $c$.

$v$ and $w$ consist only $c$: contradiction again, consider $k=0$ (you should notice $k=0$ is valid!), the number of $a$ and $b$ will be no less than that of $c$, contradiction again.