0

We know according to the pumping lemma if a language is regular, then a string already exists and it can be separated into 3 parts ( called decompositions ), 1 string can have multiple decompositions.

If we were to cross check this property with, basically prove for regular langauges, then we would need to prove it for all such decompositions of a string

But if we were to use the pumping lemma to prove that a language is non regular, then we just need to show for only 1 decomposition of a certain string, that the application of pumping lemma here leads to a contradiction, right?

Even in Michael Sipser's book, 3rd edition, "Introduction to theory of computation" chapter 1 ~ Pumping lemma for regular languages. He just applies pumping lemma to prove non regularity on one such decomposition

But here, and according to the contrapositive statement, we are supposed to apply pumping lemma to all possible decompositions when using it to prove non regularity

So, which is correct?

Pratik Hadawale
  • 335
  • 4
  • 15

2 Answers2

1

The decomposition of the input string matches exactly a cycle in the finite state machine used to parse the language.

So you have to either find one suitable decomposition that meets the conditions of the pumping lemma (in that case it is quite likely but not guaranteed the language is regular), or you show no such decomposition exists (in that case the language is not regular).

gnasher729
  • 32,238
  • 36
  • 56
0

The Pumping Lemma says that if a language is regular then there is associated with that language a natural number, the pumping length. The point of that length is that for any string in the language at least as long as that length, that string has a decomposition into three substrings, which satisfy the conditions of the lemma. So the short answer is that you look at one decomposition type, not every possible decomposition (for instance, not a decomposition into four parts, or a decomposition into three parts that does not satisfy the conditions).

For example, we can show that $L=\{a^nb^n| n\in\mathbb{N}\}$ is not regular. For contradiction, suppose that it is regular. Let its pumping length be $p$. You now need to strategically pick a string longer than $p$. Maybe you say: let $\sigma=a^pb^p$. (So when you say "a string already exists", perhaps this is the point of confusion? Maybe you didn't know that your argument needs to name a particular string in the language?)

Then the Pumping Lemma says that there is a decomposition into three parts, $\sigma=\alpha\beta\gamma$, such that (1) the length of the concatenation $\alpha\beta$ is less than or equal to $p$, and therefore the substring $\alpha$ and the substring $\beta$ consist of only $a$'s since the first $p$-many characters of $\sigma$ are all $a$'s, and (2) the substring $\beta$ is not empty, so it consists of at least one $a$, and (3) all of the strings on this list are also in the language: $\alpha\gamma$, $\alpha\beta\beta\gamma$, $\alpha\beta\beta\beta\gamma$, etc. (That is, we do not look at all possible decompositions of $\sigma$, only this one.)

Now the contradiction is: $\alpha\gamma$ has fewer $a$'s but the same number of $b$'s as $\sigma=\alpha\beta\gamma$. It therefore does not have the same number of $a$'s as $b$'s.

Jim Hefferon
  • 138
  • 6