$R=\{(x,y)\mid x,y\; \text{are 5 bit strings with equal numbers of zeros }\}$ Prove that $R$ is an equivalence relation. How much classes does it have?
Asked
Active
Viewed 63 times
-2
1 Answers
1
Consider the function $f$ that assigns the number of zeroes to its input which is a bit string of length $5$.
It's straightforward that $R$ is just the 'kernel' of $f$, i.e. $(x,y)\in R\iff f(x)=f(y) $.
The number of equivalence classes of $R$ are thus corresponding to the possible values (=elements of the range) of $f$, which in this case is $\{0,1,2,3,4,5\}$.
Berci
- 90,745
-
-
-
-
Yes, that element (and also $00000$) forms an equivalence class with a single element. – Berci Dec 15 '19 at 14:19
-
00000 - 5 00001 - 4 00011 - 3 00111 - 2 10000 - 1 11111 - 0 something like that,right? – Berianidze Luka Dec 15 '19 at 14:20
-
Yes, something like that. Just I'd rather write '$\mapsto$' to denote the function assignment in place of your '-'. Also, $10000\mapsto 4$ and not $1$. – Berci Dec 15 '19 at 14:22
-
-
-
-
Note that it's a generally applicable method: if a relation is defined as (some property of two objects coincide), you can just define the function to the set of given properties. – Berci Dec 15 '19 at 14:28
0 is in only 1 line,so It think answer is 1
– Berianidze Luka Dec 15 '19 at 13:59