1
$\begingroup$

Let $s = a^pb^{2p}$, now which one of those decomposition is correct:

$x=a^k$, $y=a^l$, $z=a^{p-k-l}b^{2p}$, where $k+l \leq p$

$x=a^{p-k}$, $y=a^k$, $z=b^{2p}$, where $1\leq k \leq p$

$x=\epsilon$, $y=a$, $z=a^{p-1}b^{2p}$

or are they the same? I've read in multiple answers that we don't get to pick the decomposition, but I'm not sure how to understand this, because to me all of those decompositions are legitimate.

$\endgroup$

1 Answer 1

1
$\begingroup$

Here is the statement of the pumping lemma:

If $L$ is a regular language then there exists an integer $p$ such that every word $w \in L$ of length at least $p$ has a decomposition $w = xyz$ such that (i) $|xy| \leq p$, (ii) $y \neq \epsilon$, (iii) for all $i \geq 0$, $xy^iz \in L$.

Here is the contrapositive, which is how you usually apply the lemma:

Suppose that $L$ is a language such that for every $p$ there exists a word $w \in L$ of length at least $p$ such that for every decomposition $w = xyz$ satisfying $|xy| \leq p$ and $y \neq \epsilon$, there exists $i \geq 0$ such that $xy^iz \notin L$. Then $L$ is not regular.

When you apply the lemma to show that a language is not regular, you have to consider all possible decompositions satisfying $|xy| \leq p$ and $y \neq \epsilon$. For each of them you need to find an $i$ such that $xy^iz \notin L$.

$\endgroup$
1
  • $\begingroup$ I think that finally makes sense. Thank you! $\endgroup$ Nov 13, 2017 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.