# What happens if we remove the length condition on the pumpable part in the pumping lemma for context free languages?

Let $$G$$ be any CFG Grammar. There exists number $$K$$ dependent to $$G$$ so that for each $$w\in L(G)$$ with length bigger or equal than $$K$$, we can be write $$w=uvxyz$$ such that $$uv^nxy^nz \in L(G)\; \forall\,n\geq 0$$ and $$|vy|\geq 1$$.

My question is that this statement does not include the case of $$|vxy|\leq K$$. Should it be included for the theorem completeness, or is it redundant and it is indeed a special case (my professor did not include it e.g. but on Wikipedia and other books I always see that they include it)?

It is odd that your professor taught you a weaker version of pumping lemma for context-free languages. I would believe it was unintentional.

As noted in the question, the condition $$|vxy|\le K$$ where $$v\ y$$ is the pumpable part and $$K$$ is the pumping length is included in the standard pumping lemma for context-free languages on this Wikpedia page or in common relevant introductory textbooks.

While the weaker version is correct, it is less useful and less powerful for proving a language is not context-free.

• That condition makes it easier to prove many a language is not context-free.
• There are languages that satisfy the weaker version but not the standard version. For example, the non-context-free language $$\{w\#t\mid w\text{ is a substring of }t,\text{ where }w, t\in\{a, b\}^*\}.$$

It takes little extra work to prove the standard version than the weaker version. It does not make much sense to deviate from the common practice that includes that condition in the pumping lemma.

• Yes, my wrong of course I meant either one of v, y not empty (I edited it in main post). Also bigger or equal than K. The only missing was the original case I wrote.
– dvox
Commented Jun 8, 2023 at 5:06
• So are both versions equivalent? I mean can I prove everything I could with $|vxy|\leq K$ and without that condition?
– dvox
Commented Jun 8, 2023 at 5:17
• @dvox Please see my update. Commented Jun 8, 2023 at 19:03
• Ok, great thanks!
– dvox
Commented Jun 8, 2023 at 21:35
• The language of words over alphabet $\{a,b,c,d\}$ having the same number of $a$s and $b$s as well as the same number of $c$s and $d$s is another non-context-free language that satisfies the weaker version but not the standard version. Commented Jun 21, 2023 at 20:32