0

I have two questions about how to use pumping lemma for regular languages to show that two languages are not regular. I would appreciate if someone can confirm if my answers make sense, and if not, what needs to be done

1) Prove that the following languages aren't regular. You can use the pumping lemma and the closing of the class of the regular languages under union, intersection and complement.

a) $L_1 = \{w \in \{0,1\}^* \mid w \text{ is not a palindrome}\}$

My solution: Pick up w as the string $010010$. $x = \varepsilon$, $y = 01$ and $z = 0010$. By the pumping lemma the string $xyyz$ should also be regular. However $xyyz = 01010010$ which is not a palindrome. So, by contradiction, $L_1$ is not a regular language.

b) $L_2 = \{ wtw \mid w,t \in \{0,1\}^* \}$

My solution. Pick up w as the string $0101$ and pick up $t=011$ as the other string. So $wtw= 0101\ 011\ 0101$ which belongs to $\{0,1\}$. By the pumping lemma, the string $xyyz$ should also be regular. However, choosing $y=110$ of $010\ 0|11\ 0|0101$, the string $0101\ 011\ 110\ 0101$ is produced which cannot be generated by $wtw$. So, by contradiction, $L_2$ is not a regular language.

Many thanks to any help.

J.-E. Pin
  • 6,129
  • 18
  • 36
user2752471
  • 151
  • 2
  • 4
  • 1
    The language in b) is regular. Did you maybe introduce an error in copying? – FrankW Jan 25 '14 at 00:25
  • This question appears to be unsuited for this site because questions of the form: "This is the exercise problem, this is my solution. Please grade!" are not interesting for anyone but you. Please see this related meta discussion. If you want to ask a specific question about a specific part of your attempt, please edit the question accordingly and it may be reopened. – Raphael Jan 25 '14 at 16:43
  • You are not using the pumping lemma correctly. You don't get to choose $x,y,z$. Please review the statement of the pumping lemma and the examples in the textbook. There are also several reference questions on this site, such as this one. – Yuval Filmus Jan 25 '14 at 01:13

0 Answers0