1

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 \in\Sigma^*: 3\mid\text{length}(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 $S\subseteq\Sigma^*\times\Sigma^*$ 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.

DSt_FTW
  • 41
  • 2
    What is the definition of R in this? – Q the Platypus Aug 24 '18 at 07: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 '18 at 08:08
  • @AlexDSt The info in your comment is essential and must be a part of your question. Check my edit. – drhab Aug 24 '18 at 08:29

1 Answers1

2

If I understand well then $wSw'$ iff $$\text{length}(w)\equiv\text{length}(w')\mod 3$$or equivlently:$$3\mid\text{length}(w)-\text{length}(w')$$

This can also be expressed by: $$f(w)=f(w')$$where $f:\Sigma^*\to\{0,1,2\}$ is the function prescribed by $$w\mapsto\text{length}(w)-3\lfloor\frac13\cdot\text{length}(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 $w\in\Sigma^*$ 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\})=\{vw\mid v\in\Sigma\wedge w\in L\}$
  • $f^{-1}(\{2\})=\{uvw\mid u,v\in\Sigma\wedge w\in L\}$
drhab
  • 151,093
  • 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-30 = 0, and if length(w)= 3, then 3-33/3 = 0? – DSt_FTW Aug 24 '18 at 11:08
  • Yes. It means that $0\mapsto0$,$1\mapsto1$,$2\mapsto 2$,$3\mapsto0$,$4\mapsto1$,$5\mapsto2$,$6\mapsto0$,$7\mapsto1$,... et cetera. – drhab Aug 24 '18 at 11:26