building a DFA from equivalence classes of $R_L$(tricky)
$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.
computer-science equivalence-relations automata
$endgroup$
add a comment |
$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.
computer-science equivalence-relations automata
$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
add a comment |
$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.
computer-science equivalence-relations automata
$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
computer-science equivalence-relations automata
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
add a comment |
$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
add a comment |
1 Answer
1
active
oldest
votes
$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).
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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).
$endgroup$
add a comment |
$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).
$endgroup$
add a comment |
$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).
$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).
answered Dec 7 '18 at 18:01
Peter TaylorPeter Taylor
9,08712342
9,08712342
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
$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