How many Nerode equivalence classes does the language $xneq y$ have?












4












$begingroup$


I have a language $L_k$ over the alphabet $Sigma={0,1,#}$ defined as follows:
begin{equation}
L_k={x#y|xin{0,1}^k,yin {0,1}^*wedge xneq y}
end{equation}



I would like to find all the Nerode equivalence classes for this language. Since this definition is somewhat hard to google I'm including it here.



The Nerode equivalence $R_L$ on a language $L$ over an alphabet $Sigma$ is defined as follows. For $s_1,s_2in Sigma^*$ $s_1R_L s_2$ if and only if $forall tinSigma^* s_1tin Liff s_2tin L$.



If we have $s_1inSigma^h$ where $0<hleq k$ such an $s_1$ must be in it's own class. We can show this by contradiction in parts. Suppose $s_2inSigma^*$ and $s_2neq s_1$.



Case 1)
$|s_2|neq |s_1|$



Choose $t=0^{h-k}#$ then $s_1t=s_10^{h-k}# in L_k$ but $s_2t=s_20^{h-k}#rnotin L_k$ since $s_2t$ has a $#$ somewhere other than at the $k+1$'st position.



Case 2)
$|s_2|=|s_1|=h$



Define $t=0^{h-k}#s_10^{h-k}$. Then $s_1t=s_10^{h-k}#s_10^{h-k}not in L_k$ since the sides around the $#$ are equal, but $s_2t=s_20^{h-k}#s_10^{h-k} in L_k$ since $s_1neq s_2$ and so the padding stays unequal.



Now how do I proceed for $s_1$ longer than $k$? Any hints or help appreciated.










share|cite|improve this question











$endgroup$












  • $begingroup$
    I think that the equivalence classes of the syntactical correspond exactly to the reachable states of a minimized DFA. So if you are able to construct some automaton, you could determinize and minimize it and kind of "read" the classes from there. Your relation takes only the left context, sou your equivalence classes should be unions of classes of the syntactical congruence. This would be an almost mechanic approach, but maybe not a very efficient one.
    $endgroup$
    – Peter Leupold
    Dec 1 '18 at 18:15
















4












$begingroup$


I have a language $L_k$ over the alphabet $Sigma={0,1,#}$ defined as follows:
begin{equation}
L_k={x#y|xin{0,1}^k,yin {0,1}^*wedge xneq y}
end{equation}



I would like to find all the Nerode equivalence classes for this language. Since this definition is somewhat hard to google I'm including it here.



The Nerode equivalence $R_L$ on a language $L$ over an alphabet $Sigma$ is defined as follows. For $s_1,s_2in Sigma^*$ $s_1R_L s_2$ if and only if $forall tinSigma^* s_1tin Liff s_2tin L$.



If we have $s_1inSigma^h$ where $0<hleq k$ such an $s_1$ must be in it's own class. We can show this by contradiction in parts. Suppose $s_2inSigma^*$ and $s_2neq s_1$.



Case 1)
$|s_2|neq |s_1|$



Choose $t=0^{h-k}#$ then $s_1t=s_10^{h-k}# in L_k$ but $s_2t=s_20^{h-k}#rnotin L_k$ since $s_2t$ has a $#$ somewhere other than at the $k+1$'st position.



Case 2)
$|s_2|=|s_1|=h$



Define $t=0^{h-k}#s_10^{h-k}$. Then $s_1t=s_10^{h-k}#s_10^{h-k}not in L_k$ since the sides around the $#$ are equal, but $s_2t=s_20^{h-k}#s_10^{h-k} in L_k$ since $s_1neq s_2$ and so the padding stays unequal.



Now how do I proceed for $s_1$ longer than $k$? Any hints or help appreciated.










share|cite|improve this question











$endgroup$












  • $begingroup$
    I think that the equivalence classes of the syntactical correspond exactly to the reachable states of a minimized DFA. So if you are able to construct some automaton, you could determinize and minimize it and kind of "read" the classes from there. Your relation takes only the left context, sou your equivalence classes should be unions of classes of the syntactical congruence. This would be an almost mechanic approach, but maybe not a very efficient one.
    $endgroup$
    – Peter Leupold
    Dec 1 '18 at 18:15














4












4








4


1



$begingroup$


I have a language $L_k$ over the alphabet $Sigma={0,1,#}$ defined as follows:
begin{equation}
L_k={x#y|xin{0,1}^k,yin {0,1}^*wedge xneq y}
end{equation}



I would like to find all the Nerode equivalence classes for this language. Since this definition is somewhat hard to google I'm including it here.



The Nerode equivalence $R_L$ on a language $L$ over an alphabet $Sigma$ is defined as follows. For $s_1,s_2in Sigma^*$ $s_1R_L s_2$ if and only if $forall tinSigma^* s_1tin Liff s_2tin L$.



If we have $s_1inSigma^h$ where $0<hleq k$ such an $s_1$ must be in it's own class. We can show this by contradiction in parts. Suppose $s_2inSigma^*$ and $s_2neq s_1$.



Case 1)
$|s_2|neq |s_1|$



Choose $t=0^{h-k}#$ then $s_1t=s_10^{h-k}# in L_k$ but $s_2t=s_20^{h-k}#rnotin L_k$ since $s_2t$ has a $#$ somewhere other than at the $k+1$'st position.



Case 2)
$|s_2|=|s_1|=h$



Define $t=0^{h-k}#s_10^{h-k}$. Then $s_1t=s_10^{h-k}#s_10^{h-k}not in L_k$ since the sides around the $#$ are equal, but $s_2t=s_20^{h-k}#s_10^{h-k} in L_k$ since $s_1neq s_2$ and so the padding stays unequal.



Now how do I proceed for $s_1$ longer than $k$? Any hints or help appreciated.










share|cite|improve this question











$endgroup$




I have a language $L_k$ over the alphabet $Sigma={0,1,#}$ defined as follows:
begin{equation}
L_k={x#y|xin{0,1}^k,yin {0,1}^*wedge xneq y}
end{equation}



I would like to find all the Nerode equivalence classes for this language. Since this definition is somewhat hard to google I'm including it here.



The Nerode equivalence $R_L$ on a language $L$ over an alphabet $Sigma$ is defined as follows. For $s_1,s_2in Sigma^*$ $s_1R_L s_2$ if and only if $forall tinSigma^* s_1tin Liff s_2tin L$.



If we have $s_1inSigma^h$ where $0<hleq k$ such an $s_1$ must be in it's own class. We can show this by contradiction in parts. Suppose $s_2inSigma^*$ and $s_2neq s_1$.



Case 1)
$|s_2|neq |s_1|$



Choose $t=0^{h-k}#$ then $s_1t=s_10^{h-k}# in L_k$ but $s_2t=s_20^{h-k}#rnotin L_k$ since $s_2t$ has a $#$ somewhere other than at the $k+1$'st position.



Case 2)
$|s_2|=|s_1|=h$



Define $t=0^{h-k}#s_10^{h-k}$. Then $s_1t=s_10^{h-k}#s_10^{h-k}not in L_k$ since the sides around the $#$ are equal, but $s_2t=s_20^{h-k}#s_10^{h-k} in L_k$ since $s_1neq s_2$ and so the padding stays unequal.



Now how do I proceed for $s_1$ longer than $k$? Any hints or help appreciated.







computer-science formal-languages automata






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 4 '18 at 13:41







DRF

















asked Dec 1 '18 at 11:37









DRFDRF

4,507926




4,507926












  • $begingroup$
    I think that the equivalence classes of the syntactical correspond exactly to the reachable states of a minimized DFA. So if you are able to construct some automaton, you could determinize and minimize it and kind of "read" the classes from there. Your relation takes only the left context, sou your equivalence classes should be unions of classes of the syntactical congruence. This would be an almost mechanic approach, but maybe not a very efficient one.
    $endgroup$
    – Peter Leupold
    Dec 1 '18 at 18:15


















  • $begingroup$
    I think that the equivalence classes of the syntactical correspond exactly to the reachable states of a minimized DFA. So if you are able to construct some automaton, you could determinize and minimize it and kind of "read" the classes from there. Your relation takes only the left context, sou your equivalence classes should be unions of classes of the syntactical congruence. This would be an almost mechanic approach, but maybe not a very efficient one.
    $endgroup$
    – Peter Leupold
    Dec 1 '18 at 18:15
















$begingroup$
I think that the equivalence classes of the syntactical correspond exactly to the reachable states of a minimized DFA. So if you are able to construct some automaton, you could determinize and minimize it and kind of "read" the classes from there. Your relation takes only the left context, sou your equivalence classes should be unions of classes of the syntactical congruence. This would be an almost mechanic approach, but maybe not a very efficient one.
$endgroup$
– Peter Leupold
Dec 1 '18 at 18:15




$begingroup$
I think that the equivalence classes of the syntactical correspond exactly to the reachable states of a minimized DFA. So if you are able to construct some automaton, you could determinize and minimize it and kind of "read" the classes from there. Your relation takes only the left context, sou your equivalence classes should be unions of classes of the syntactical congruence. This would be an almost mechanic approach, but maybe not a very efficient one.
$endgroup$
– Peter Leupold
Dec 1 '18 at 18:15










1 Answer
1






active

oldest

votes


















1












$begingroup$

The equivalence classes are as follows:




  • Class $B$: All words with (1) $#$ not on position $k+1$, (2) $#$ missing from position $k+1$, (3) more than $2k+1$ letters, or of the form (4) $x#x$, where $|x|=k$.

  • Class $G_ell$ for $1 leq ell leq k$: All words of the form $x#y$, where $|x|=k$, $|y| = ell$, and $x_i neq y_i$ for some $i leq ell$.

  • Every other word is its own equivalence class. These are words of the form $x$ for $|x| leq k$ and words of the form $x # y$, where $|x| = k$, $|y| < k$, and $y$ is a prefix of $x$ (possibly $y = epsilon$).


All words in $B$ and all of their extensions are not in $L_k$. In contrast, all other words extend to a word in $L_k$. This shows that $B$ is an equivalence class. All words in $G_ell$ can be extended to a word in $L_k$ by any string of length exactly $k-ell$. In contrast, words of the singleton classes don't have these properties. This shows that the $G_ell$ are equivalence classes.



Finally, to show that the singletons are equivalence classes, it suffices to consider two words of the same length and show that they can be extended so that one of them is in $L_k$ and the other aren't. There are a few cases to consider, but they are all pretty simple. One also needs to check that the equivalence classes together cover all words.






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3021245%2fhow-many-nerode-equivalence-classes-does-the-language-x-neq-y-have%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    The equivalence classes are as follows:




    • Class $B$: All words with (1) $#$ not on position $k+1$, (2) $#$ missing from position $k+1$, (3) more than $2k+1$ letters, or of the form (4) $x#x$, where $|x|=k$.

    • Class $G_ell$ for $1 leq ell leq k$: All words of the form $x#y$, where $|x|=k$, $|y| = ell$, and $x_i neq y_i$ for some $i leq ell$.

    • Every other word is its own equivalence class. These are words of the form $x$ for $|x| leq k$ and words of the form $x # y$, where $|x| = k$, $|y| < k$, and $y$ is a prefix of $x$ (possibly $y = epsilon$).


    All words in $B$ and all of their extensions are not in $L_k$. In contrast, all other words extend to a word in $L_k$. This shows that $B$ is an equivalence class. All words in $G_ell$ can be extended to a word in $L_k$ by any string of length exactly $k-ell$. In contrast, words of the singleton classes don't have these properties. This shows that the $G_ell$ are equivalence classes.



    Finally, to show that the singletons are equivalence classes, it suffices to consider two words of the same length and show that they can be extended so that one of them is in $L_k$ and the other aren't. There are a few cases to consider, but they are all pretty simple. One also needs to check that the equivalence classes together cover all words.






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      The equivalence classes are as follows:




      • Class $B$: All words with (1) $#$ not on position $k+1$, (2) $#$ missing from position $k+1$, (3) more than $2k+1$ letters, or of the form (4) $x#x$, where $|x|=k$.

      • Class $G_ell$ for $1 leq ell leq k$: All words of the form $x#y$, where $|x|=k$, $|y| = ell$, and $x_i neq y_i$ for some $i leq ell$.

      • Every other word is its own equivalence class. These are words of the form $x$ for $|x| leq k$ and words of the form $x # y$, where $|x| = k$, $|y| < k$, and $y$ is a prefix of $x$ (possibly $y = epsilon$).


      All words in $B$ and all of their extensions are not in $L_k$. In contrast, all other words extend to a word in $L_k$. This shows that $B$ is an equivalence class. All words in $G_ell$ can be extended to a word in $L_k$ by any string of length exactly $k-ell$. In contrast, words of the singleton classes don't have these properties. This shows that the $G_ell$ are equivalence classes.



      Finally, to show that the singletons are equivalence classes, it suffices to consider two words of the same length and show that they can be extended so that one of them is in $L_k$ and the other aren't. There are a few cases to consider, but they are all pretty simple. One also needs to check that the equivalence classes together cover all words.






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        The equivalence classes are as follows:




        • Class $B$: All words with (1) $#$ not on position $k+1$, (2) $#$ missing from position $k+1$, (3) more than $2k+1$ letters, or of the form (4) $x#x$, where $|x|=k$.

        • Class $G_ell$ for $1 leq ell leq k$: All words of the form $x#y$, where $|x|=k$, $|y| = ell$, and $x_i neq y_i$ for some $i leq ell$.

        • Every other word is its own equivalence class. These are words of the form $x$ for $|x| leq k$ and words of the form $x # y$, where $|x| = k$, $|y| < k$, and $y$ is a prefix of $x$ (possibly $y = epsilon$).


        All words in $B$ and all of their extensions are not in $L_k$. In contrast, all other words extend to a word in $L_k$. This shows that $B$ is an equivalence class. All words in $G_ell$ can be extended to a word in $L_k$ by any string of length exactly $k-ell$. In contrast, words of the singleton classes don't have these properties. This shows that the $G_ell$ are equivalence classes.



        Finally, to show that the singletons are equivalence classes, it suffices to consider two words of the same length and show that they can be extended so that one of them is in $L_k$ and the other aren't. There are a few cases to consider, but they are all pretty simple. One also needs to check that the equivalence classes together cover all words.






        share|cite|improve this answer









        $endgroup$



        The equivalence classes are as follows:




        • Class $B$: All words with (1) $#$ not on position $k+1$, (2) $#$ missing from position $k+1$, (3) more than $2k+1$ letters, or of the form (4) $x#x$, where $|x|=k$.

        • Class $G_ell$ for $1 leq ell leq k$: All words of the form $x#y$, where $|x|=k$, $|y| = ell$, and $x_i neq y_i$ for some $i leq ell$.

        • Every other word is its own equivalence class. These are words of the form $x$ for $|x| leq k$ and words of the form $x # y$, where $|x| = k$, $|y| < k$, and $y$ is a prefix of $x$ (possibly $y = epsilon$).


        All words in $B$ and all of their extensions are not in $L_k$. In contrast, all other words extend to a word in $L_k$. This shows that $B$ is an equivalence class. All words in $G_ell$ can be extended to a word in $L_k$ by any string of length exactly $k-ell$. In contrast, words of the singleton classes don't have these properties. This shows that the $G_ell$ are equivalence classes.



        Finally, to show that the singletons are equivalence classes, it suffices to consider two words of the same length and show that they can be extended so that one of them is in $L_k$ and the other aren't. There are a few cases to consider, but they are all pretty simple. One also needs to check that the equivalence classes together cover all words.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 16 at 22:13









        Yuval FilmusYuval Filmus

        48.6k471144




        48.6k471144






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3021245%2fhow-many-nerode-equivalence-classes-does-the-language-x-neq-y-have%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mario Kart Wii

            The Binding of Isaac: Rebirth/Afterbirth

            What does “Dominus providebit” mean?