Find representatives for equivalence classes of $L=\{0^m 1^n\mid m\ne n\}$

212 Views Asked by At

Find representatives for equivalence classes of $\sim_L$ for $L=\{0^m 1^n\mid m\ne n\}$.

My try:

First, I proved that there are infinite equivalence classes (assumed it is regular and got a contradiction to the pumping lemma).

Now, I'm understanding that $\left[\varepsilon\right],[1]$ are representatives. Also, for any $m\ne n$ we can write that $x=0^m$ and $y=0^n$ are in different equivalence classes as $z=1^n$ guarantees that $xz\in L$, but $yz\notin L$.

I doubt that those are all of the equivalence classes. As a matter of fact, I think that there is no way to represent each equivalence class of this language.

Any help will be appreciated, thanks!

1

There are 1 best solutions below

4
On BEST ANSWER

There are quite a few equivalence classes, but they can be identified.

  • The class $[1]$ consists of the words $0^m1^n$ with $m<n$: any extension that contains a $0$ takes these words out of $L$, and any extension without a $0$ leaves them in $L$.

  • For each $k\ge 1$ there is a class $[0^k1]$ that consists of the words $0^{k+n}1^{1+n}$ with $n\ge 0$: any extension that contains a $0$ takes these words out of $L$, as does the extension $1^{k-1}$, but all other extensions without a $0$ leave them in $L$.

These can be combined into a single description: for each $k\ge 0$ we have a class $[0^k1]$.

  • There is a class $[10]$ that consists of all words that contain $10$ as a substring: no extension of any of these words is in $L$.

  • Finally, for each $k\ge 0$ there is a class $[0^k]$ that contains only the word $0^k$. (The $k=0$ case is of course $[\epsilon]$.) The extensions that put $\epsilon$ in $L$ are precisely the words in $L$, and no other string has this property. For $k>0$ the extensions that keep $0^k$ in $L$ are the words in $L$ that are not of the form $0^n1^{n+k}$ for some $n\ge 0$, and here again $0^k$ is the only string with this property.

I’ll leave it to you to verify that these classes are distinct, and that they exhaust the possibilities.