Prove using the Myhill-Nerode theorem that the language $L = \{xyz| x,y \in\{a,b\}^+\}$ - is not regular
My answer:
To prove that $L$ is not regular, we need to show that there are infinitely many distinct equivalence classes for $L$.
Consider the strings of the form $๐^i$ and $๐^๐๐$ for $๐ โฅ1$:
Let $x_i = a^i$ and $y = b$.
For any $i,j \ge 1$, consider $x_i = a^i$ and $x_j = a^j$.
Show that $x_i$ and $x_j$ are in Different Equivalence Classes:
For $x_i = a^i$, $x_i y x_i=a^i b a^i \in L$.
For $x_j= a^j, x_j y x_j = a^j b a^j \in L$.
If $i \ne j $, then $a^i b a^i \ne a^j b a^j$
because the number of $a$'s before and after the $b$ would be different.
Thus, $a^i$ and $a^j$ belong to different equivalence classes for $i\ne j $.
Since there are infinitely many choices for $i$, there are infinitely many distinct equivalence classes.
Thus this explanation ok to show the language is not regular?