So this is the language that I need to prove is irregular via pumping lemma, however I am completely stuck with this and seeking some advice. The other ones I have done during my tutorial are much more simple but struggling a bit more when it comes to having two conditions as such. Any help would be appreciated
-
1Welcome to Computer Science! Note that you can use LaTeX here to typeset mathematics in a more readable way. See here for a short introduction. – Raphael Nov 22 '23 at 21:29
-
Please do not change the question to a different one after receiving an answer. – Steven Nov 22 '23 at 22:47
-
https://cs.stackexchange.com/q/1031/755 – D.W. Nov 23 '23 at 00:00
2 Answers
Suppose towards a contradiction that $L$ is regular and let $p$ be its pumping length. Consider the word $w = cb^{4+p}c^{7+p} \in L$. By the pumping lemma, $w$ can be written as $xyz$ with $|xy| \le p$ and non-empty $y$ such that $xy^iz \in L$ for all $i \ge 0$.
By our choice of $w$ either $y = cb^k$ for some non-negative $k < p$ or $y=b^k$ for some positive $k$. In the former case $x=\varepsilon$ and $xy^0z = z \not\in L$ (to see this, notice that $z$ starts with neither $c$ nor $d$). In the latter case $xy^0z = cb^{4+p-k}y^{7+p} \not\in L$.
Since we reach a contradiction in both cases, we conclude that $L$ cannot be regular.
Alternatively (as per you comment) you can "pump" $w$ as follows. In the former case, $xy^2z$ starts with $cb^kcb^k$, hence $xy^2z \not\in L$. In the latter case $xy^2b = cb^{4+p+k}y^{7+p} \not \in L$ (since $k \ge 1$).

- 29,419
- 2
- 28
- 49
-
-
In order for a word to be in $L$, it must end with a certain number of $b$s followed by 3 more $c$s than $b$s. In $xy^2 b$ you have $4 + k + p \ge 5+p$ $b$s but only $7+p$ $c$s, i.e., there are at most $2$ more $c$s than $b$s. Therefore $xy^2b \not\in L$. – Steven Nov 22 '23 at 21:59
Assume you parsed c b^(m+4) for some m. Show that different m must give different states.
You are in a state where c^(m+7) leads to an accepting state. After parsing c b^(m’+4) for m’ ≠ m the same input does not lead to an accepting state, so you are in a different state. Since there are infinitely many different m a finite state machine cannot parse the language.

- 29,996
- 34
- 54