2

I have to prove that the following languages are not regular using the Myhill-Nerode Theorem.

  1. $\{0^{n}1^{m}0^{n} \mid{} m,n \ge 0\}$
  2. $\{w \in\{0,1\}^{\ast}\mid w\text{ is not a palindrome}\}$

For the first question, I did the following:

I considered the set $\{0^n1^m \mid{} m,n\ge 0\}$. To prove that this set is pairwise distinguishable by the original language, I said that for all $m$ and $n$, $0^n1^m$ is distinguishable from all previous $0^i1^m,\:0\:\le i\le n-1$ because there exists a $z=0^n$ such that $0^n1^mz$ is an element of the original language but $0^i1^mz,\:0\le i\le n-1$ is not an element of the original language.

I first want to ask whether this was indeed the correct way to do the proof?

I am also quite confused for the second question as none of the strings are palindromes. So I am quite confused on how to approach the problem.

Any help would be highly appreciated!

sktsasus
  • 2,042

1 Answers1

1

For the first language, your idea is exactly correct.

$0^n1z \in L \iff z = 0^n$. Thus $0^n1$ and $0^m1$ are in separate equivalence classes for every $m \not = n$.

For the second, let's use $0^n1$ again. For $n \not = m$,

$0^n10^n \not \in L$ but $0^m10^n \in L$. Thus $0^n1$ and $0^m1$ are in separate equivalence classes, and the claim follows.


I hope this helps ^_^

HallaSurvivor
  • 38,115
  • 4
  • 46
  • 87
  • Thank you for the response. For the second question, could you please explain how $0^m10^n$ is in the language? Isn't the language supposed to consist of $0$'s and $1$'s in alternating order? But this string can consist of multiple $0$'s towards the end. – sktsasus Sep 27 '19 at 01:48
  • 1
    A palindrome is a string which is the same forwards and backwards - so $0001000$ is a palindrome, while $000100$ is not a palindrome, for instance. – HallaSurvivor Sep 27 '19 at 02:03
  • Oh I see. Thank you! – sktsasus Sep 27 '19 at 02:09