Relation and Function problems

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Trying to solve these problems for a whole day, but just can't figure out where to start.



let $Sigma=a,b$ and $L = w inSigma^*: 3midtextlength(w)$



Define R ⊆ Σ
* × Σ
* as follows: (w, w'
) ∈ R if there is a v ∈ Σ
*
such
that: either wv ∈ L and w
'v ∉ L, or wv ∉ L and w
'v ∈ L.



Define $SsubseteqSigma^*timesSigma^*$ as the complement of $R$. That is $(w, w') in S$ iff $(w, w')notin R$.



  1. State a simple rule for determining if $(w, w') in S$

  2. show that $S$ is an equivalence relation

  3. How many equivalence classes does $S$ have?


Any tips or direction will be much appreciated.







share|cite|improve this question


















  • 2




    What is the definition of R in this?
    – Q the Platypus
    Aug 24 at 7:25










  • there is another part of the question before this 'Define R ⊆ Æ©* x Æ©* as follows: (w, w') ∈ R if there is a v ∈ Æ©* such that: either vw ∈ L and w'v ∉ L, or wv ∉ L and w'v ∈ L. this wat the first part of the question, I tought they are not related, or are they?
    – DSt_FTW
    Aug 24 at 8:08











  • @AlexDSt The info in your comment is essential and must be a part of your question. Check my edit.
    – drhab
    Aug 24 at 8:29














up vote
1
down vote

favorite












Trying to solve these problems for a whole day, but just can't figure out where to start.



let $Sigma=a,b$ and $L = w inSigma^*: 3midtextlength(w)$



Define R ⊆ Σ
* × Σ
* as follows: (w, w'
) ∈ R if there is a v ∈ Σ
*
such
that: either wv ∈ L and w
'v ∉ L, or wv ∉ L and w
'v ∈ L.



Define $SsubseteqSigma^*timesSigma^*$ as the complement of $R$. That is $(w, w') in S$ iff $(w, w')notin R$.



  1. State a simple rule for determining if $(w, w') in S$

  2. show that $S$ is an equivalence relation

  3. How many equivalence classes does $S$ have?


Any tips or direction will be much appreciated.







share|cite|improve this question


















  • 2




    What is the definition of R in this?
    – Q the Platypus
    Aug 24 at 7:25










  • there is another part of the question before this 'Define R ⊆ Æ©* x Æ©* as follows: (w, w') ∈ R if there is a v ∈ Æ©* such that: either vw ∈ L and w'v ∉ L, or wv ∉ L and w'v ∈ L. this wat the first part of the question, I tought they are not related, or are they?
    – DSt_FTW
    Aug 24 at 8:08











  • @AlexDSt The info in your comment is essential and must be a part of your question. Check my edit.
    – drhab
    Aug 24 at 8:29












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Trying to solve these problems for a whole day, but just can't figure out where to start.



let $Sigma=a,b$ and $L = w inSigma^*: 3midtextlength(w)$



Define R ⊆ Σ
* × Σ
* as follows: (w, w'
) ∈ R if there is a v ∈ Σ
*
such
that: either wv ∈ L and w
'v ∉ L, or wv ∉ L and w
'v ∈ L.



Define $SsubseteqSigma^*timesSigma^*$ as the complement of $R$. That is $(w, w') in S$ iff $(w, w')notin R$.



  1. State a simple rule for determining if $(w, w') in S$

  2. show that $S$ is an equivalence relation

  3. How many equivalence classes does $S$ have?


Any tips or direction will be much appreciated.







share|cite|improve this question














Trying to solve these problems for a whole day, but just can't figure out where to start.



let $Sigma=a,b$ and $L = w inSigma^*: 3midtextlength(w)$



Define R ⊆ Σ
* × Σ
* as follows: (w, w'
) ∈ R if there is a v ∈ Σ
*
such
that: either wv ∈ L and w
'v ∉ L, or wv ∉ L and w
'v ∈ L.



Define $SsubseteqSigma^*timesSigma^*$ as the complement of $R$. That is $(w, w') in S$ iff $(w, w')notin R$.



  1. State a simple rule for determining if $(w, w') in S$

  2. show that $S$ is an equivalence relation

  3. How many equivalence classes does $S$ have?


Any tips or direction will be much appreciated.









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Aug 24 at 12:38

























asked Aug 24 at 6:46









DSt_FTW

226




226







  • 2




    What is the definition of R in this?
    – Q the Platypus
    Aug 24 at 7:25










  • there is another part of the question before this 'Define R ⊆ Æ©* x Æ©* as follows: (w, w') ∈ R if there is a v ∈ Æ©* such that: either vw ∈ L and w'v ∉ L, or wv ∉ L and w'v ∈ L. this wat the first part of the question, I tought they are not related, or are they?
    – DSt_FTW
    Aug 24 at 8:08











  • @AlexDSt The info in your comment is essential and must be a part of your question. Check my edit.
    – drhab
    Aug 24 at 8:29












  • 2




    What is the definition of R in this?
    – Q the Platypus
    Aug 24 at 7:25










  • there is another part of the question before this 'Define R ⊆ Æ©* x Æ©* as follows: (w, w') ∈ R if there is a v ∈ Æ©* such that: either vw ∈ L and w'v ∉ L, or wv ∉ L and w'v ∈ L. this wat the first part of the question, I tought they are not related, or are they?
    – DSt_FTW
    Aug 24 at 8:08











  • @AlexDSt The info in your comment is essential and must be a part of your question. Check my edit.
    – drhab
    Aug 24 at 8:29







2




2




What is the definition of R in this?
– Q the Platypus
Aug 24 at 7:25




What is the definition of R in this?
– Q the Platypus
Aug 24 at 7:25












there is another part of the question before this 'Define R ⊆ Ʃ* x Ʃ* as follows: (w, w') ∈ R if there is a v ∈ Ʃ* such that: either vw ∈ L and w'v ∉ L, or wv ∉ L and w'v ∈ L. this wat the first part of the question, I tought they are not related, or are they?
– DSt_FTW
Aug 24 at 8:08





there is another part of the question before this 'Define R ⊆ Ʃ* x Ʃ* as follows: (w, w') ∈ R if there is a v ∈ Ʃ* such that: either vw ∈ L and w'v ∉ L, or wv ∉ L and w'v ∈ L. this wat the first part of the question, I tought they are not related, or are they?
– DSt_FTW
Aug 24 at 8:08













@AlexDSt The info in your comment is essential and must be a part of your question. Check my edit.
– drhab
Aug 24 at 8:29




@AlexDSt The info in your comment is essential and must be a part of your question. Check my edit.
– drhab
Aug 24 at 8:29










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










If I understand well then $wSw'$ iff $$textlength(w)equivtextlength(w')mod 3$$or equivlently:$$3midtextlength(w)-textlength(w')$$



This can also be expressed by: $$f(w)=f(w')$$where $f:Sigma^*to0,1,2$ is the function prescribed by $$wmapstotextlength(w)-3lfloorfrac13cdottextlength(w)rfloor$$



On base of $wSw'iff f(w)=f(w')$ it is easy to prove that $S$ is an equivalence relation:



  • $f(w)=f(w)$ for all $winSigma^*$ so reflexivity.

  • $f(w)=f(v)implies f(v)=f(w)$ so symmetry.

  • $f(w)=f(v)wedge f(v)=f(u)implies f(w)=f(u)$ so transitivity.

The equivalence classes are the sets:



  • $f^-1(0)=L$

  • $f^-1(1)=vwmid vinSigmawedge win L$

  • $f^-1(2)=uvwmid u,vinSigmawedge win L$





share|cite|improve this answer




















  • took me a while to get through the first huddle of understanding the first 3, but what is this means? w↦length(w)−3⌊1/3⋅length(w)⌋, if length of w = 0, wont this means 0-3*0 = 0, and if length(w)= 3, then 3-3*3/3 = 0?
    – DSt_FTW
    Aug 24 at 11:08










  • Yes. It means that $0mapsto0$,$1mapsto1$,$2mapsto 2$,$3mapsto0$,$4mapsto1$,$5mapsto2$,$6mapsto0$,$7mapsto1$,... et cetera.
    – drhab
    Aug 24 at 11:26











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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f2892848%2frelation-and-function-problems%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










If I understand well then $wSw'$ iff $$textlength(w)equivtextlength(w')mod 3$$or equivlently:$$3midtextlength(w)-textlength(w')$$



This can also be expressed by: $$f(w)=f(w')$$where $f:Sigma^*to0,1,2$ is the function prescribed by $$wmapstotextlength(w)-3lfloorfrac13cdottextlength(w)rfloor$$



On base of $wSw'iff f(w)=f(w')$ it is easy to prove that $S$ is an equivalence relation:



  • $f(w)=f(w)$ for all $winSigma^*$ so reflexivity.

  • $f(w)=f(v)implies f(v)=f(w)$ so symmetry.

  • $f(w)=f(v)wedge f(v)=f(u)implies f(w)=f(u)$ so transitivity.

The equivalence classes are the sets:



  • $f^-1(0)=L$

  • $f^-1(1)=vwmid vinSigmawedge win L$

  • $f^-1(2)=uvwmid u,vinSigmawedge win L$





share|cite|improve this answer




















  • took me a while to get through the first huddle of understanding the first 3, but what is this means? w↦length(w)−3⌊1/3⋅length(w)⌋, if length of w = 0, wont this means 0-3*0 = 0, and if length(w)= 3, then 3-3*3/3 = 0?
    – DSt_FTW
    Aug 24 at 11:08










  • Yes. It means that $0mapsto0$,$1mapsto1$,$2mapsto 2$,$3mapsto0$,$4mapsto1$,$5mapsto2$,$6mapsto0$,$7mapsto1$,... et cetera.
    – drhab
    Aug 24 at 11:26















up vote
2
down vote



accepted










If I understand well then $wSw'$ iff $$textlength(w)equivtextlength(w')mod 3$$or equivlently:$$3midtextlength(w)-textlength(w')$$



This can also be expressed by: $$f(w)=f(w')$$where $f:Sigma^*to0,1,2$ is the function prescribed by $$wmapstotextlength(w)-3lfloorfrac13cdottextlength(w)rfloor$$



On base of $wSw'iff f(w)=f(w')$ it is easy to prove that $S$ is an equivalence relation:



  • $f(w)=f(w)$ for all $winSigma^*$ so reflexivity.

  • $f(w)=f(v)implies f(v)=f(w)$ so symmetry.

  • $f(w)=f(v)wedge f(v)=f(u)implies f(w)=f(u)$ so transitivity.

The equivalence classes are the sets:



  • $f^-1(0)=L$

  • $f^-1(1)=vwmid vinSigmawedge win L$

  • $f^-1(2)=uvwmid u,vinSigmawedge win L$





share|cite|improve this answer




















  • took me a while to get through the first huddle of understanding the first 3, but what is this means? w↦length(w)−3⌊1/3⋅length(w)⌋, if length of w = 0, wont this means 0-3*0 = 0, and if length(w)= 3, then 3-3*3/3 = 0?
    – DSt_FTW
    Aug 24 at 11:08










  • Yes. It means that $0mapsto0$,$1mapsto1$,$2mapsto 2$,$3mapsto0$,$4mapsto1$,$5mapsto2$,$6mapsto0$,$7mapsto1$,... et cetera.
    – drhab
    Aug 24 at 11:26













up vote
2
down vote



accepted







up vote
2
down vote



accepted






If I understand well then $wSw'$ iff $$textlength(w)equivtextlength(w')mod 3$$or equivlently:$$3midtextlength(w)-textlength(w')$$



This can also be expressed by: $$f(w)=f(w')$$where $f:Sigma^*to0,1,2$ is the function prescribed by $$wmapstotextlength(w)-3lfloorfrac13cdottextlength(w)rfloor$$



On base of $wSw'iff f(w)=f(w')$ it is easy to prove that $S$ is an equivalence relation:



  • $f(w)=f(w)$ for all $winSigma^*$ so reflexivity.

  • $f(w)=f(v)implies f(v)=f(w)$ so symmetry.

  • $f(w)=f(v)wedge f(v)=f(u)implies f(w)=f(u)$ so transitivity.

The equivalence classes are the sets:



  • $f^-1(0)=L$

  • $f^-1(1)=vwmid vinSigmawedge win L$

  • $f^-1(2)=uvwmid u,vinSigmawedge win L$





share|cite|improve this answer












If I understand well then $wSw'$ iff $$textlength(w)equivtextlength(w')mod 3$$or equivlently:$$3midtextlength(w)-textlength(w')$$



This can also be expressed by: $$f(w)=f(w')$$where $f:Sigma^*to0,1,2$ is the function prescribed by $$wmapstotextlength(w)-3lfloorfrac13cdottextlength(w)rfloor$$



On base of $wSw'iff f(w)=f(w')$ it is easy to prove that $S$ is an equivalence relation:



  • $f(w)=f(w)$ for all $winSigma^*$ so reflexivity.

  • $f(w)=f(v)implies f(v)=f(w)$ so symmetry.

  • $f(w)=f(v)wedge f(v)=f(u)implies f(w)=f(u)$ so transitivity.

The equivalence classes are the sets:



  • $f^-1(0)=L$

  • $f^-1(1)=vwmid vinSigmawedge win L$

  • $f^-1(2)=uvwmid u,vinSigmawedge win L$






share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Aug 24 at 8:59









drhab

88.3k541120




88.3k541120











  • took me a while to get through the first huddle of understanding the first 3, but what is this means? w↦length(w)−3⌊1/3⋅length(w)⌋, if length of w = 0, wont this means 0-3*0 = 0, and if length(w)= 3, then 3-3*3/3 = 0?
    – DSt_FTW
    Aug 24 at 11:08










  • Yes. It means that $0mapsto0$,$1mapsto1$,$2mapsto 2$,$3mapsto0$,$4mapsto1$,$5mapsto2$,$6mapsto0$,$7mapsto1$,... et cetera.
    – drhab
    Aug 24 at 11:26

















  • took me a while to get through the first huddle of understanding the first 3, but what is this means? w↦length(w)−3⌊1/3⋅length(w)⌋, if length of w = 0, wont this means 0-3*0 = 0, and if length(w)= 3, then 3-3*3/3 = 0?
    – DSt_FTW
    Aug 24 at 11:08










  • Yes. It means that $0mapsto0$,$1mapsto1$,$2mapsto 2$,$3mapsto0$,$4mapsto1$,$5mapsto2$,$6mapsto0$,$7mapsto1$,... et cetera.
    – drhab
    Aug 24 at 11:26
















took me a while to get through the first huddle of understanding the first 3, but what is this means? w↦length(w)−3⌊1/3⋅length(w)⌋, if length of w = 0, wont this means 0-3*0 = 0, and if length(w)= 3, then 3-3*3/3 = 0?
– DSt_FTW
Aug 24 at 11:08




took me a while to get through the first huddle of understanding the first 3, but what is this means? w↦length(w)−3⌊1/3⋅length(w)⌋, if length of w = 0, wont this means 0-3*0 = 0, and if length(w)= 3, then 3-3*3/3 = 0?
– DSt_FTW
Aug 24 at 11:08












Yes. It means that $0mapsto0$,$1mapsto1$,$2mapsto 2$,$3mapsto0$,$4mapsto1$,$5mapsto2$,$6mapsto0$,$7mapsto1$,... et cetera.
– drhab
Aug 24 at 11:26





Yes. It means that $0mapsto0$,$1mapsto1$,$2mapsto 2$,$3mapsto0$,$4mapsto1$,$5mapsto2$,$6mapsto0$,$7mapsto1$,... et cetera.
– drhab
Aug 24 at 11:26


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2892848%2frelation-and-function-problems%23new-answer', 'question_page');

);

Post as a guest













































































這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Mutual Information Always Non-negative

Why am i infinitely getting the same tweet with the Twitter Search API?