0

For a regular language $A$ with an alphabet $\Sigma$, define an equivalence relation for strings $x,y \in \Sigma^*$ by $x\equiv_A y\Leftrightarrow \,\forall w\in \Sigma^*, xw, yw\in A$ or $xw, yw\not\in A$. Let $[x] := \{ y\in \Sigma^* : y\equiv_A x\}$ be the equivalence class of $x$ with respect to $A$ for any $x\in \Sigma^*$. Let $A$ and $B$ be two regular languages, and suppose they have the exact same set of equivalence classes (as defined above).

Prove or disprove that $A$ and $B$ are either equal or complements.

I think the statement is true. Let $A_1,\cdots, A_k$ be the equivalence classes of $\Sigma^*$ with respect to $A$ (there are finitely many by the Myhill-Nerode theorem). I'm not sure how to get a contradiction if I assume there's a string $x$ in $A$ but not in $B$ and a string $y$ in $A$ and $B$. Obviously both strings must belong to different equivalence classes of $B$, and hence $A$.

Fred Jefferson
  • 299
  • 1
  • 8
  • Please don't delete your questions. – Yuval Filmus May 27 '22 at 16:25
  • 1
    I already gave a counterexample in a comment on the deleted question. – Yuval Filmus May 27 '22 at 16:26
  • Here are some notes on the minimal DFA: http://www.cs.cornell.edu/courses/cs682/2008sp/Handouts/MN.pdf – Yuval Filmus May 27 '22 at 16:33
  • Where did you encounter this task? We require you to credit the original source of all copied material: https://cs.stackexchange.com/help/referencing. I've given you this feedback before: https://cs.stackexchange.com/questions/148411/#comment311232_148411, https://cs.stackexchange.com/questions/150271/#comment315919_150271, https://cs.stackexchange.com/questions/148357/#comment311144_148357, https://cs.stackexchange.com/questions/140827/#comment295707_140827 – D.W. May 27 '22 at 20:47

1 Answers1

1

No, the statement is not true. The language defines the equivalence classes, but not the other way around. Each class can be totally within or totally outside the language. So with several classes we have some room to choose which classes are in and which classes are out the language. We have to be careful though, some choices will change the equivalence relation itself.

Hendrik Jan
  • 30,578
  • 1
  • 51
  • 105