building a DFA from equivalence classes of $R_L$(tricky)












0












$begingroup$


i've encoutered an interesting question from an old exam with no solution and i was wondering: how do you build a dfa(deterministic finite automata) from given equivalence classes?



this is the question:



L is a language over {0,1}, for which the equivalence classes of $R_L$ are:



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:evenright}$



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:evenright}$



also: $epsilon in L$ and $0, 1, 1110 not in L$.



how can i build a deterministic finite automata that accepts L?



would really appreciate an elaborated answer so i could actually understand what you've done and learn from it.



thank you very much for your help



EDIT: what i tried. so basically from what i understood, because the language consists only of {0,1}, then we can divide it into equivalnce classes such that whether $#_0$ and $#_1$ are even or odd. however, i don't know how to create the DFA from the equivalence classes. this is why i've been asking for help because i don't understand how to do it. since $epsilon in L$ then i can connect it somehow in the digraph. basically it is represting all of the possible number of occurences of {0,1} excluding 0, 1, 1110.



sorry if i couldn't write more, i just don't know how to do it.










share|cite|improve this question











$endgroup$












  • $begingroup$
    What have you tried? You are more likely to get answers if you show effort on your part.
    $endgroup$
    – Landuros
    Dec 5 '18 at 10:41










  • $begingroup$
    i'll edit it and say what i tried. thank you for commenting and explaining
    $endgroup$
    – compute
    Dec 5 '18 at 10:50










  • $begingroup$
    Hint: create a state for each class and define the transitions between them appropriately. From there you should be able to decide which one should be your initial state and how you can reject words not in $L$.
    $endgroup$
    – dkaeae
    Dec 5 '18 at 12:29










  • $begingroup$
    Are you familiar with the Myhill-Nerode theorem?
    $endgroup$
    – Peter Taylor
    Dec 6 '18 at 18:42










  • $begingroup$
    @PeterTaylor - yes, but i'm having problem reversing it, going from the equivalence classes to the automata
    $endgroup$
    – compute
    Dec 7 '18 at 17:34
















0












$begingroup$


i've encoutered an interesting question from an old exam with no solution and i was wondering: how do you build a dfa(deterministic finite automata) from given equivalence classes?



this is the question:



L is a language over {0,1}, for which the equivalence classes of $R_L$ are:



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:evenright}$



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:evenright}$



also: $epsilon in L$ and $0, 1, 1110 not in L$.



how can i build a deterministic finite automata that accepts L?



would really appreciate an elaborated answer so i could actually understand what you've done and learn from it.



thank you very much for your help



EDIT: what i tried. so basically from what i understood, because the language consists only of {0,1}, then we can divide it into equivalnce classes such that whether $#_0$ and $#_1$ are even or odd. however, i don't know how to create the DFA from the equivalence classes. this is why i've been asking for help because i don't understand how to do it. since $epsilon in L$ then i can connect it somehow in the digraph. basically it is represting all of the possible number of occurences of {0,1} excluding 0, 1, 1110.



sorry if i couldn't write more, i just don't know how to do it.










share|cite|improve this question











$endgroup$












  • $begingroup$
    What have you tried? You are more likely to get answers if you show effort on your part.
    $endgroup$
    – Landuros
    Dec 5 '18 at 10:41










  • $begingroup$
    i'll edit it and say what i tried. thank you for commenting and explaining
    $endgroup$
    – compute
    Dec 5 '18 at 10:50










  • $begingroup$
    Hint: create a state for each class and define the transitions between them appropriately. From there you should be able to decide which one should be your initial state and how you can reject words not in $L$.
    $endgroup$
    – dkaeae
    Dec 5 '18 at 12:29










  • $begingroup$
    Are you familiar with the Myhill-Nerode theorem?
    $endgroup$
    – Peter Taylor
    Dec 6 '18 at 18:42










  • $begingroup$
    @PeterTaylor - yes, but i'm having problem reversing it, going from the equivalence classes to the automata
    $endgroup$
    – compute
    Dec 7 '18 at 17:34














0












0








0





$begingroup$


i've encoutered an interesting question from an old exam with no solution and i was wondering: how do you build a dfa(deterministic finite automata) from given equivalence classes?



this is the question:



L is a language over {0,1}, for which the equivalence classes of $R_L$ are:



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:evenright}$



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:evenright}$



also: $epsilon in L$ and $0, 1, 1110 not in L$.



how can i build a deterministic finite automata that accepts L?



would really appreciate an elaborated answer so i could actually understand what you've done and learn from it.



thank you very much for your help



EDIT: what i tried. so basically from what i understood, because the language consists only of {0,1}, then we can divide it into equivalnce classes such that whether $#_0$ and $#_1$ are even or odd. however, i don't know how to create the DFA from the equivalence classes. this is why i've been asking for help because i don't understand how to do it. since $epsilon in L$ then i can connect it somehow in the digraph. basically it is represting all of the possible number of occurences of {0,1} excluding 0, 1, 1110.



sorry if i couldn't write more, i just don't know how to do it.










share|cite|improve this question











$endgroup$




i've encoutered an interesting question from an old exam with no solution and i was wondering: how do you build a dfa(deterministic finite automata) from given equivalence classes?



this is the question:



L is a language over {0,1}, for which the equivalence classes of $R_L$ are:



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:evenright}$



$left{w|#:_0left(wright):is:even:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:oddright}$



$left{w|#:_0left(wright):is:odd:an:#_1:left(wright)is:evenright}$



also: $epsilon in L$ and $0, 1, 1110 not in L$.



how can i build a deterministic finite automata that accepts L?



would really appreciate an elaborated answer so i could actually understand what you've done and learn from it.



thank you very much for your help



EDIT: what i tried. so basically from what i understood, because the language consists only of {0,1}, then we can divide it into equivalnce classes such that whether $#_0$ and $#_1$ are even or odd. however, i don't know how to create the DFA from the equivalence classes. this is why i've been asking for help because i don't understand how to do it. since $epsilon in L$ then i can connect it somehow in the digraph. basically it is represting all of the possible number of occurences of {0,1} excluding 0, 1, 1110.



sorry if i couldn't write more, i just don't know how to do it.







computer-science equivalence-relations automata






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 5 '18 at 11:44







compute

















asked Dec 5 '18 at 10:36









computecompute

11




11












  • $begingroup$
    What have you tried? You are more likely to get answers if you show effort on your part.
    $endgroup$
    – Landuros
    Dec 5 '18 at 10:41










  • $begingroup$
    i'll edit it and say what i tried. thank you for commenting and explaining
    $endgroup$
    – compute
    Dec 5 '18 at 10:50










  • $begingroup$
    Hint: create a state for each class and define the transitions between them appropriately. From there you should be able to decide which one should be your initial state and how you can reject words not in $L$.
    $endgroup$
    – dkaeae
    Dec 5 '18 at 12:29










  • $begingroup$
    Are you familiar with the Myhill-Nerode theorem?
    $endgroup$
    – Peter Taylor
    Dec 6 '18 at 18:42










  • $begingroup$
    @PeterTaylor - yes, but i'm having problem reversing it, going from the equivalence classes to the automata
    $endgroup$
    – compute
    Dec 7 '18 at 17:34


















  • $begingroup$
    What have you tried? You are more likely to get answers if you show effort on your part.
    $endgroup$
    – Landuros
    Dec 5 '18 at 10:41










  • $begingroup$
    i'll edit it and say what i tried. thank you for commenting and explaining
    $endgroup$
    – compute
    Dec 5 '18 at 10:50










  • $begingroup$
    Hint: create a state for each class and define the transitions between them appropriately. From there you should be able to decide which one should be your initial state and how you can reject words not in $L$.
    $endgroup$
    – dkaeae
    Dec 5 '18 at 12:29










  • $begingroup$
    Are you familiar with the Myhill-Nerode theorem?
    $endgroup$
    – Peter Taylor
    Dec 6 '18 at 18:42










  • $begingroup$
    @PeterTaylor - yes, but i'm having problem reversing it, going from the equivalence classes to the automata
    $endgroup$
    – compute
    Dec 7 '18 at 17:34
















$begingroup$
What have you tried? You are more likely to get answers if you show effort on your part.
$endgroup$
– Landuros
Dec 5 '18 at 10:41




$begingroup$
What have you tried? You are more likely to get answers if you show effort on your part.
$endgroup$
– Landuros
Dec 5 '18 at 10:41












$begingroup$
i'll edit it and say what i tried. thank you for commenting and explaining
$endgroup$
– compute
Dec 5 '18 at 10:50




$begingroup$
i'll edit it and say what i tried. thank you for commenting and explaining
$endgroup$
– compute
Dec 5 '18 at 10:50












$begingroup$
Hint: create a state for each class and define the transitions between them appropriately. From there you should be able to decide which one should be your initial state and how you can reject words not in $L$.
$endgroup$
– dkaeae
Dec 5 '18 at 12:29




$begingroup$
Hint: create a state for each class and define the transitions between them appropriately. From there you should be able to decide which one should be your initial state and how you can reject words not in $L$.
$endgroup$
– dkaeae
Dec 5 '18 at 12:29












$begingroup$
Are you familiar with the Myhill-Nerode theorem?
$endgroup$
– Peter Taylor
Dec 6 '18 at 18:42




$begingroup$
Are you familiar with the Myhill-Nerode theorem?
$endgroup$
– Peter Taylor
Dec 6 '18 at 18:42












$begingroup$
@PeterTaylor - yes, but i'm having problem reversing it, going from the equivalence classes to the automata
$endgroup$
– compute
Dec 7 '18 at 17:34




$begingroup$
@PeterTaylor - yes, but i'm having problem reversing it, going from the equivalence classes to the automata
$endgroup$
– compute
Dec 7 '18 at 17:34










1 Answer
1






active

oldest

votes


















0












$begingroup$

Step 1: what are the states? Following Myhill-Nerode, they're the equivalence classes.



Step 2: what are the transitions? For each of the four equivalence classes, and each of the two symbols in the alphabet, what equivalence class do we move to if we append that symbol?



Step 3: what is the initial state? Does $epsilon$ have an even or odd number of zeros and ones?



Step 4: what are the accepting states? This is where you use the information that $epsilon in L$ and $0,1,1110 notin L$. (It's not a coincidence that the number of words given there is equal to the number of equivalence classes).






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%2f3026917%2fbuilding-a-dfa-from-equivalence-classes-of-r-ltricky%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









    0












    $begingroup$

    Step 1: what are the states? Following Myhill-Nerode, they're the equivalence classes.



    Step 2: what are the transitions? For each of the four equivalence classes, and each of the two symbols in the alphabet, what equivalence class do we move to if we append that symbol?



    Step 3: what is the initial state? Does $epsilon$ have an even or odd number of zeros and ones?



    Step 4: what are the accepting states? This is where you use the information that $epsilon in L$ and $0,1,1110 notin L$. (It's not a coincidence that the number of words given there is equal to the number of equivalence classes).






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      Step 1: what are the states? Following Myhill-Nerode, they're the equivalence classes.



      Step 2: what are the transitions? For each of the four equivalence classes, and each of the two symbols in the alphabet, what equivalence class do we move to if we append that symbol?



      Step 3: what is the initial state? Does $epsilon$ have an even or odd number of zeros and ones?



      Step 4: what are the accepting states? This is where you use the information that $epsilon in L$ and $0,1,1110 notin L$. (It's not a coincidence that the number of words given there is equal to the number of equivalence classes).






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        Step 1: what are the states? Following Myhill-Nerode, they're the equivalence classes.



        Step 2: what are the transitions? For each of the four equivalence classes, and each of the two symbols in the alphabet, what equivalence class do we move to if we append that symbol?



        Step 3: what is the initial state? Does $epsilon$ have an even or odd number of zeros and ones?



        Step 4: what are the accepting states? This is where you use the information that $epsilon in L$ and $0,1,1110 notin L$. (It's not a coincidence that the number of words given there is equal to the number of equivalence classes).






        share|cite|improve this answer









        $endgroup$



        Step 1: what are the states? Following Myhill-Nerode, they're the equivalence classes.



        Step 2: what are the transitions? For each of the four equivalence classes, and each of the two symbols in the alphabet, what equivalence class do we move to if we append that symbol?



        Step 3: what is the initial state? Does $epsilon$ have an even or odd number of zeros and ones?



        Step 4: what are the accepting states? This is where you use the information that $epsilon in L$ and $0,1,1110 notin L$. (It's not a coincidence that the number of words given there is equal to the number of equivalence classes).







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 7 '18 at 18:01









        Peter TaylorPeter Taylor

        9,08712342




        9,08712342






























            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%2f3026917%2fbuilding-a-dfa-from-equivalence-classes-of-r-ltricky%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

            How to change which sound is reproduced for terminal bell?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Can I use Tabulator js library in my java Spring + Thymeleaf project?