1

Hint: Assume that $|xy| \le k$ in the pumping lemma.

I have no idea where to begin for this. Any help would be much appreciated.

Brian M. Scott
  • 616,228
zeqof
  • 181
  • 1
  • 2
  • 9

2 Answers2

2

Suppose that $L$ is regular. The pumping lemma for regular languages then says that there is a positive integer $p$ such that whenever $w\in L$ and $|w|\ge p$, $w$ can be written as a concatenation $xyz$ such that $|y|\ge 1$, $|xy|\le p$, and $xy^kz\in L$ for all integers $k\ge 0$. To show that $L$ is not regular, you need only find a word $w\in L$ that cannot be written as such a concatenation.

Let $w=ab^pab^p$; clearly $w\in L$ and $|w|=2p+2\ge p$. Suppose that $w=xyz$, where $|y|\ge 1$, $|xy|\le p$, and $xy^kz\in L$ for all integers $k\ge 0$. Then $xy=ab^n$ for some $n\le p-1$ (why?), so either $x$ is empty and $y=ab^n$, or $y=b^m$ for some $m\ge 1$. In either case, explain why $xz=xy^0z\notin L$, contradicting the hypothesis that $xy^kz\in L$ for all integers $k\ge 0$. Conclude that this word $w$ cannot be decomposed as in the pumping lemma and hence that $L$ cannot be regular.

Brian M. Scott
  • 616,228
0

It's also possible — and perhaps simpler — to prove this directly using the pigeonhole principle without invoking the pumping lemma.

Namely, assume that the language $L = \{ww \,|\, w \in \{a,b\}^*\}$ is recognized by a finite state automaton with $n$ states, and consider the set $W = \{a,b\}^k \subset \{a,b\}^*$ of words of length $k$, where $2^k > n$.

By the pigeonhole principle, since $|W| = 2^k > n$, there must be two distinct words $w,w' \in W$ such that, after reading the word $w$, the automaton is in the same state as after reading $w'$. But this means that, since the automaton accepts $ww \in L$, it must also accept $w'w \notin L$, which leads to a contradiction.

  • Thanks. That is a lot simpler. But since the hint mentions the pumping lemma specifically, I'm going with that approach. Thanks for your method though. It will help with my revision. – zeqof Oct 17 '12 at 22:28