1

I feel that choice should work great for proving non - regularity of the mentioned language.

If $L=\{ww|w \in \{0,1\}^*\}$ and we choose $s=0^p0^p$, meaning s is atleast as long as 'p'. Then we can decompose s as follows $x=empty \ string,\ y = 0^p, \ z = 0^p$

Then we can pump 'y' according to the rules of pumping lemma we will end up with 2p zeroes which is more than the number of zeroes in 'z'

And we have reached a contradiction because this new string is not in the language and according to the pumping lemma it should have, so why does michael sipser say that it's a bad candidate for proving non regularity in this langauge?

Pratik Hadawale
  • 315
  • 3
  • 14

2 Answers2

3

Your proof doesn't work. First of all you can't choose your favorite decomposition of $s$: the pumping lemma just ensures that such a decomposition exists so your argument needs to work for all possible decompositions.

Nevertheless, even with your decomposition it is false that the "pumped" word does not belong to the language. To see why suppose that the pumping length $p$ happens to be $2$. Then $s=0^20^2=0000$, $x=\varepsilon$, $y=0^2=00$, and $z=0^2=00$.

Now let's pump $y=00$ to, e.g., $y^2 = 0000$. The resulting word is $xy^2z = \varepsilon\, 0000\, 0^2 = 000000$. As you can see $000000 \in L$ (by choosing $w=000$).

You run in the same problem regardless of how many times (possibly $0$) you pump $y$.

Steven
  • 29,419
  • 2
  • 28
  • 49
  • but consider this scenario, what if pumping length $p$ happens to be 3 then the resultant string after pumping once would be $000000000$ which is 9 zeros, there's no way that this string would be in language – Pratik Hadawale Jan 13 '23 at 16:45
  • 1
    Yes, but you don't get to choose the pumping length. You only know that there is some value of $p$ such that the pumping lemma holds. – Steven Jan 13 '23 at 16:50
  • basically are you saying that ~ one needs to carefully select a particular string such that our argument must work for all values of 'p'? – Pratik Hadawale Jan 13 '23 at 16:55
  • 1
    Yes, you need to choose a particular string $s$ (that can be chosen as a function of $p$) such that the argument works regardless of $p$ and for all possible decompositions $s=xyz$ with $|xy| \le p$ and $|p|\ge 1$. For example, if you choose $0^p10^p1$ you can be ensured that $xy$, and in particular $y$, contain only $0$s that appear before the first $1$. Then pumping $y$ yields a word that is not in the language. – Steven Jan 13 '23 at 17:17
  • Ah gotchu, you answered my question. I additional doubt: you said "argument needs to work for all possible decompositions", but every video and tutorial mentions that if we are using pumping lemma to prove non regularity through contradiction then we just need to prove for 1 such decomposition, so why do you say that we need to prove for all decompositions? – Pratik Hadawale Jan 13 '23 at 17:22
  • If you are aiming for a contradiction. you need to show that the pumping lemma does not hold. That is, you need to show that for all pumping lengths $p$, there is some string $s \in L$ with $|s| \ge p$ such that, for all possible decompositions $s=xyz$, there exists some $i$ for which $xy^iz \not \in L$. The above is the negation of the pumping lemma statement (recall that the pumping lemma states that there exists $p$ such that, for any $s \in L$ with $|s| \ge p$, there exists some decomposition $s=xyz$ that guarantees that, for all $i$, the string $xy^iz$ is in $L$). – Steven Jan 13 '23 at 17:30
  • In the above comment I'm not re-listing the constraints on the decomposition, due to lack of space. You can find the full statement (and some more general versions) on wikipedia or in textbooks. – Steven Jan 13 '23 at 17:33
  • What you stated is the "contrapositive" form of the pumping lemma, if i am right. But think about this you use the original form of the pumping lemma and assume that the given non regular language is regular and in that case you can show atleast 1 decomposition fails to result in the language meaning pumping lemma does not hold and hence we are at a contradiction. If we use this form then even 1 decomposition works. Am I think of this in the wrong way? – Pratik Hadawale Jan 13 '23 at 17:36
  • The original form of the pumping lemma only guarantees you that some decompositions exists. If you show that one decomposition doesn't work, then you haven't reached a contradiction. – Steven Jan 13 '23 at 17:39
  • I asked this very specific question on this site: https://cs.stackexchange.com/a/156707/150275 and someone said that we just need to look at one such decomposition, i am confused which is it? – Pratik Hadawale Jan 13 '23 at 17:41
  • You do need to look at all possible decompositions (that satisfy the conditions in the pumping lemma statement). What the answer you linked is doing is choosing the word $s$ in a clever way to ensure that all decompositions $s=xyz$ of $s$ (such that $|xy| \le p$ and $|y| \ge 1$) will follow a convenient pattern. In particular $s=a^pb^p$ which ensures that $xy$ contains only $a$. We can then conclude that any decomposition will be of the form $x=a^n$, $y=a^m$ $z=a^{p-n-m}b^p$ (for suitable integers $n$ and $m$). We can get a contradiction by pumping $y$, e.g., $xy^2z = a^{p+m}b^p$. – Steven Jan 13 '23 at 18:36
  • Notice that we have argued that all possible decompositions have $x=a^n$, $y=a^m$, and $z=a^{p-n-m}b^p$ for some $n$ and $m$. We are assuming towards a contradiction that $L$ is regular which tells us that some value of $n$ and $m$ must exists, but we don't know what these magic values are. Since we have been clever in the selection of $s$, it turns out that we don't really need to know. Indeed, we managed to pump $y$ so that, no matter what $n$ and $m$ are, the resulting string cannot belong to $L$. I.e., we have shown that all possible decompositions yield a contradiction. – Steven Jan 13 '23 at 18:46
  • Oh wow, I am still confused can you link me proper study material, a book is preferable, about this very particular confusion. I would appreciate it, Michael sipsers books does not talk much about this confusion. I saw your other comment now and it makes sense but i still would like a resource, how are you so good at this – Pratik Hadawale Jan 13 '23 at 18:47
  • @PratikHadawale. I'm sorry, I don't have another book in English to recommend. – Steven Jan 13 '23 at 23:00
  • I think I am starting to understand, is it that pumping lemma says that there exists 'p' such that if we pick a string from the language that is atleast 'p' then one decomposition exists, according to the structure of the language, but there can be multiple ways to interpret that decomposition i.e different ways to split into x,y,z and we need to account for all these interpretations ~ inorder for the contradiction to work. But obviously, it's a painful task to sit down and note down all of the decompositions, so we can generalize the pattern of the decomposition and it's interpretations [con] – Pratik Hadawale Jan 14 '23 at 05:16
  • [con] example for langauge $a^pb^p$, there will be one decomposition but multiple ways to interpret that into x,y,z. Then either we can account for all interpretation one by one like $x=aa,y=a^{p-2},z=b^p$ and so forth orr we can just generalize the pattern and say since due to the conditions of the pumping lemma xy will only contain $a$s $x=a^m,y=a^k,z=b^p$ where m+k = p and that would allow to capture all the interpretations. Am I right? – Pratik Hadawale Jan 14 '23 at 05:21
1

First of all, you don't get to pick the decomposition. So one decomposition you'd need to handle is $x = \varepsilon$, $y = 00$, $z = 0^{2p-2}$. Now if we pump $y$ for $i$ times, we get $xy^iz = 0^{2p + 2i - 2}$, which belongs to $L$.

Arno
  • 3,065
  • 10
  • 22