Is $$L =\big\{x^ny^m : |n-m| = 2\big\}$$ a regular language?
I can't seem to figure this question out, and i've tried drawing a dfa but I still can't seem to find it. If there is a possible dfa, could someone show me the transition graph/table? If not how do i prove this question?
HINT: Apply the pumping lemma to the word $x^py^{p+2}$, where $p$ is the pumping length.