How do I use the pumping lemma for a^n b^m a^(n+m) ? How can I choose the pumping length? $L = {a^n + b^m + a^{n+m}}$
This is the language I want to show is not regular.
Now my problem is to choose p correctly.
Can I just set it as p=2*(n+m) ?
That's the problem I am facing now.
Thanks for any help I am starting to learn it to use the pumping lemma.
Edit:
In the meantime I have done this:
$w=a^nb^ma^{n+m}$
|w|= 2(n+m)=p
$|xy|\leq 2n + 2m$
We choose $x=a^n, y=b^m, z=a^{n+m}$
$|a^nb^m|=nm \leq 2n+2m$
w=xy^iz
Now we set i = 0
$w_0=a^na^{n+m} \notin L $
$\implies $ L is not regular.
It seems that you are trying to force the string length to be $p$, which is not necessary. What is required is that $|xy| \leq p$. The length of $w$ can be greater than $p$. Also, $n$ or $m$ can be $p$ or some multiple of $p$, whatever  makes the reasoning for the impossibilty of partition of $w$ to satisfy the lemma. With that, I think you can follow through and complete your proof.
Just remember, the aim is not to look for a partition of $w$ that does not work. Rather show that no partition works.
Cheers.