we have a Language $$\mathscr L: \{a^mb^n: m \ne n\}$$
we need to choose a good string $w$.
apparently $w = a^{n+1}m^{n}$ is not a good string.
can someone explain why?
I also found this and I thought this is highly misleading, because when I use this I get wrong answers.
How to Use the Pumping Lemma for Regular Languages When you are given a language L and are using the pumping lemma to prove that it is not regular, do this: : :
Assume L is regular. If it is, then the P.L. would apply. So, there is some n such that any string longer than n, say the string x, can be broken up into substrings u; v;w such that juvj n | which means the pumping part, v, lies within the rst n characters jvj > 0 | which means there is at least one character in v uvw is the string x And uvmw is also in L for any m 0 | that is, pumping at v won't take the string out of the language. The key observation is that this is true for any suciently long x. You will pick a particular one from which you can get a contradiction.
Choose some string longer than n, where n is the (unknown) value guaranteed to exist by the P.L. Choose this string with a view to what you're about to do, so you can pump it up and derive a contradiction.
You know v is within the rst n characters, so take your string and pump it up (or de ate it) to get a new string.
Show that this new string is not in L. Since the P.L. says it is in L if L is regular, it must be the case that L is not regular.
You are done. Celebrate.