Define the relation $R$ on the set $\Bbb Z^+$ of all positive integers by: for all $a, b \in \Bbb Z^+$, $aRb$ if and only if the largest digit of a is equal to the largest digit of $b$. For example, $\,271\,R\, 770\,$ because the largest digit of $271$ is 7 which is also the largest digit of $770$.
- Prove that $R$ is an equivalence relation on $Z^+$.
- Find the number of equivalence classes of $R$. Explain.
- Find and simplify the number of positive integers between $100$ and $1000$ which are in the equivalence class $[271]$. Explain.
My attempt to answer:
A relation $R$ is on a set $Z^+$ is equivalence if and only if, $R$ is reflexive, and $R$ is symmetric and $R$ is transitive.
Here, $R$ is reflexive because, for all $a \in \Bbb Z\ aRa$.
$R$ is symmetric as well. For all $a, b \in \Bbb Z$, if $aRb$ then $bRa$.
$R$ is transitive as well, because, for all $a, b, c \in \Bbb Z$, if $aRb$ and $bRc$, then $aRc$.
Therefore, $R$ is equivalence.Number of equivalence classes of $R$, $\ [R]$ = $\left\{\,x \mid x \in\; \equiv \,\right\}$ so we have 9 equivalence classes.
I am not sure about this. Can someone explain this part to me please?
Hint:
If you investigate the questions like: "is $R$ and equivalence relation on set $A$?" then often (even stronger: almost always) it is very handsome to look for a function that has $A$ as domain and satisfies $$aRb\iff f(a)=f(b)\tag1$$
If you have found such a function then you are allowed to conclude:
It is clear also that the number of equivalence classes is the cardinality of the range of function $f$.
You can do it with the function $f:\mathbb Z^+\rightarrow\{1,2,\cdots,9\}$ prescribed by: $$n\mapsto\text{largest digit of } n$$
Why is it so that you can conclude immediately that $R$ is an equivalence relation? Well:
It is clear as crystal that these things are true for any function $f$ and $(1)$ makes it legal to replace expressions like $f(a)=f(b)$ by $aRb$.