Understanding pumping lemma - length $p$ - in connection with other thread

54 Views Asked by At

I create this thread in connection with Is the following language $L$ regular?
I would like to show you why I dont understand where I am wrong. I would like to ask question: $p$ - length of pumping lemma.
If $L$ is regular then exists $p$ for every word $s\in L$ such that $|s|\ge p$ there is partition of word $s=xyz$ meet expactations:
$(1)\forall_{i\ge 0} xy^iz\in L$
$(2)|y| > 0$
$(3)|xy|\le p$

And now fragment of solution from book: Show that $\{w|\#_1(w)=\#_0(w)\}$ is irregular. (# denotes count).
Given $s=0^p1^p$. We may say that (thanks to (3)) $y$ contains only 0s.

And analogically, $L=\{ww^Rv\mid v,w\in \{a,b\}^+\}$ I say that for $s=a^pb(a^pb)^Rv=xyz$.
Then $y$ contains only symbols $xy^2z=a^{p+k}b(a^pb)^Rv$. And now you see that $a^{p+k}b(a^pb)^R\notin L$ (because it is not palindrom). Where am I wrong ? Pay attention to the fact I do analogically to book.

Edit
$X\cap L = Z$

if $Z$ is irregular then $X$ or $L$ is irregular.
Let $X=(ab)^+(ba)^+$ is regular.
$X\cap L = Z = \{(ab)^n(ba)^k| k > n\} $

Because of fact that $Z$ is irregular and $X$ is regular then $L$ is irregular.

1

There are 1 best solutions below

10
On BEST ANSWER

Your mistake is in thinking that $a^{p+k}b(a^pb)^R\notin L$. In fact this word is in $L$. To see this, let $w=a$ and $v=a^{p+k-2}b(a^pb)^R$; then $a^{p+k}b(a^pb)^R=ww^Rv$, so $a^{p+k}b(a^pb)^R\in L$. Every word that begins with two identical letters is in $L$.