Let $L=\left\{ w\in\Sigma^{*}\mid w\text{ has an equal number of 01 and 10}\right\}$ (e.g. $010\in L$) over $\Sigma=\left\{ 0,1\right\} $
I initially tried to prove that $L$ is not regular
Proof: Consider the strings $s_{n}=\left(01\right)^{n}=\overbrace{0101\ldots01}^{n\text{ times}}$ and $t_{m}=\left(11\right){}^{m}$ for any $m,n\in\mathbb{N}$ and the suffix $z=0$.
Note that for any choice of $m$ and $n$ $0101\ldots0\in L$ but $11\ldots10\notin L$ and therefore $z$ is a separating suffix.
Since $m$ and $n$ were not specified we have $\infty$ equivalence classes and therefore, by Myhill-Nerode, $L\notin REG $
Later, I came up with a DFA that definitely accepts $L$, meaning the above proof is wrong. Where is the fault in the argument?
$L$ is the language of words such that the first letter is equal to the last letter (and the empty word). So there are only 5 equivalence classes :