Let a language, $L$ such that the equivalence relation, as defined in Myhill–Nerode theorem has $4$ equivalence classes; $A_1, \ldots, A_4$.
Let $S = A_1 \cup A_2$.
- Is $S$ always regular?
- How many equivalence classes does the relation $\sim S$ creates?
- I think we may construct two DFA's, $D_1, D_2$ which accept $A_1, A_2$, respectively. Let $D$ to be the DFA accepting $L$. We construct $D_1$ by copying the states of $D$. We choose arbitrary $w\in A_1$ and run it on $D$. We mark as accepting state only the state which accepted the $w$. Same applied for $D_2$. Finally, we unite $D_1$ and $D_2$ be connecting a new starting state and two $\varepsilon$ arrows to each DFA. So we constructed in that way an NFA and therefore $S$ is a regular language. Is this construction legal?
- My thought is $3$ because every word can be either at $S, A_3, A_4$. Am I right?