0

"We know that if and only if means 2 directions-

We need to show that

  1. Given $ka \equiv kb \pmod{n}$ and $\gcd(k,n) = 1$, we need to show that $a \equiv b \pmod{n}$.

    This can be shown easily, by writing, $ka = nc + kb \Rightarrow k(a-b) = nc \Rightarrow n \mid k(a-b)$, but $n$ doesn't divide $k$, so $n \mid (a-b) \Rightarrow a \equiv b \pmod{n}$.

  2. Given $ka \equiv kb \pmod{n}$ and $a \equiv b \pmod{n}$, show that $\gcd(k,n) = 1$.

    I am facing a problem in showing this direction...

    I tried approaches like $ka = nc + kb$, $a = nm + b$, and tried other things like properties as shown in this post, but failed. Please help...

    I also tried the contradiction method by assuming $\gcd(k,n) = d \neq 1$, but still nothing.

    Please help, thank you"

  • 2
    Inline formulae should be enclosed with dollar signs instead of parentheses. – Ѕᴀᴀᴅ Mar 19 '24 at 03:38
  • thanks. This is my first question, so this mistake happened. How to delete or edit the question? – Aryan Das Mar 19 '24 at 03:42
  • Click on "Edit" – jjagmath Mar 19 '24 at 03:43
  • edited. Please answer it now. Thanks for the help! – Aryan Das Mar 19 '24 at 03:46
  • For (2) you are beginning with the wrong hypothesis. The hypothesis is not $$ka\equiv kb \pmod n \color{red}{\text{ and }} a\equiv b \pmod n$$ It is $$ka\equiv kb \pmod n \text{ implies } a\equiv b \pmod n$$ – jjagmath Mar 19 '24 at 03:59
  • To expound an jjagmath's comment. You nee the show that if $\gcd(k,n)=1$ then $ka\equiv kb \implies a\equiv b$; and that if $ka\equiv kb \implies a\equiv b$ then $\gcd(k,n)=1$. An easier way to do the second part may be to show if $\gcd(n,k)\ne 1$ then $ka\equiv kb\not \implies a\equiv b$. And an easier way to do that may be to show if $\gcd(n,k)\ne 1$ then there is an $a\not\equiv b$ but $ka \equiv kb$. – fleablood Mar 19 '24 at 04:16
  • Perhaps it may be easier to prove that if $ka \equiv kb\pmod n$ then $a \equiv b \pmod {\frac n{\gcd(n,k)}}$. If $\gcd(k,n)\ne 1$ you can easily find $a,b$ so that $a\equiv b\pmod{\frac n{\gcd(n,k)}}$ but $a\not\equiv b\pmod n$. – fleablood Mar 19 '24 at 04:22
  • @fleablood I tried what you told me, but see the thing is it's just not working. As for your second comment, $ka \equiv kb \pmod{n} \Rightarrow ka = nc + kb$, now also $a = \frac{n}{d}x + b$ (Considering $\gcd(k,n)=d$). Now also $a = ny + b$ (as per the required conditions), so comparing doesn't necessarily imply that $d=1$. Also as for your first comment, I tried doing that but couldn't succeed. – Aryan Das Mar 19 '24 at 04:56
  • Sure it does. Suppose you have an $a$ and $b$ so that $a\equiv b \pmod {nd}$ but $a \not \equiv b \pmod n$. For instance $0 \equiv \frac nd \pmod {\frac nd}$ but $0 \not \equiv \frac nd \pmod n$. Well notice that $k\cdot\frac nd = \frac kd\cdot n \equiv 0 \pmod n \equiv 0\cdot k \pmod n$. So here we have a case of $a =0k$ being equiv to $bk =n\cdot \frac kd$ mod $n$, but $a = 0$ note being equiv to $b=\frac nd$ mod $n$. So $(ka \equiv kb \pmod n)\not \implies (a\equiv b \pmod n)$. Thus we have $\gcd(n,k)\ne 1 \implies \lnot (ka\equiv kb\pmod n\implies a\equiv b \pmod n)$. – fleablood Mar 19 '24 at 05:33
  • Consider this. Suppose $ka \equiv kb \implies a\equiv b$. ANd suppose $d=\gcd(n,k)$. Note that $k\cdot \frac nd = \frac kd \cdot n \equiv 0 \equiv 0\cdot k \pmod n$. But our assumption that $ka \equiv kb \implies a\equiv b$ that means we must have $\frac nd \equiv 0 \pmod n$. But that means that $\frac nd$ is actually a multiple of $n$. The only way that can happen is if $d=1$. – fleablood Mar 19 '24 at 05:42

1 Answers1

1

Addendum added to react to the discussion in the comments following this posting.


Either you are misinterpreting the intent of the assertion in the posting's title, or the assertion is false.

Counter example: $~n=10, k=5, a=1,b=11.~$
Here, you have that

  • $ka \equiv kb \pmod{n}.$
  • $a \equiv b \pmod{n}.$
  • gcd$(k,n) \neq 1.$

So, the assertion in your point #2 is false, by the above counter-example.


Presumably, the assertion-composer's intent, was that if, every time that $~ka \equiv kb \pmod{n},~$ you also have that $~a \equiv b \pmod{n},~$ then you can conclude that gcd$(k,n) = 1.$

Another way of expressing the presumed intent, is that if gcd$(k,n) \neq 1,~$ then you can find some $~a,b~$ such that $~ka \equiv kb \pmod{n},~$ and $~a \not\equiv b \pmod{n}.$


$\underline{\text{Addendum}}$

Reaction to the discussion in the comments following this posting. Consider the posting's title:

Show that $ka \equiv kb \pmod{n}$ implies $a \equiv b \pmod{n}$ if and only if $\gcd(k,n) = 1$.

This ambiguous assertion can be interpreted in two different ways:

  • Show that $ka \equiv kb \pmod{n} \implies$
    $\{ ~a \equiv b \pmod{n} \iff \gcd(k,n) = 1 ~\}.$

  • Show that $\{ ~ka \equiv kb \pmod{n} \implies a \equiv b \pmod{n} ~\}$
    $\iff \gcd(k,n) = 1.$

That is, the syntax in the title makes it unclear how the logical sub-statements are to be bracketed. The bracketing in the first bullet point above leads to a false assertion, as indicated by the counter example at the start of my posting.

The bracketing in the second bullet point above leads to a true assertion. In order to analyze the assertion in the second bullet point, let

  • P denote the statement $~ka \equiv kb \pmod{n}.$
  • Q denote the statement $~a \equiv b \pmod{n}.$
  • R denote the statement $~\gcd(k,n) = 1.$

Then the assertion in the second bullet point above can be represented as

$$[P \implies Q] \iff R. \tag 1 $$

The way that I interpret (1) above is that

  • if it is impossible to have [ (P true and Q false)]
    then [R true].

    Note that this is equivalent to asserting that
    [R false] implies
    it is possible to have [ (P true and Q false)].

  • if [R true] then
    it is impossible to have [ (P true and Q false)].

user2661923
  • 35,619
  • 3
  • 17
  • 39
  • I guess, there is some misinterpretation! Like why is it written "if and only if" if only one assertion(the first one) is true? Shouldn't both be true for "if and only if"? – Aryan Das Mar 19 '24 at 04:32
  • The statement is $(ka\equiv kb\pmod n \implies a\equiv b\pmod n)\iff (\gcd(n,k)=1)$. – fleablood Mar 19 '24 at 04:55
  • @fleablood yes, so that means you need to show both the statements I stated, isn't it? – Aryan Das Mar 19 '24 at 04:57
  • No. You can't assum $a\equiv b$. You have to assume that somehow $ka\equiv kb$ will force $a\equiv b$ but that can only be forces if $\gcd(n,k)=1$. – fleablood Mar 19 '24 at 05:01
  • @fleablood isn't that the same thing? – Aryan Das Mar 19 '24 at 05:22
  • Not at all. It's possible be have $ka \equiv kb$ and $a\equiv b$ for some $a,b$ but not for all. You can't assume that if you have $ka \equiv kb$ and $a\equiv b$ that you have $(ka\equiv kb)\implies (a\equiv b)$. – fleablood Mar 19 '24 at 05:52
  • Here's an analogy. Consider the statement. ($h$ is a hotdog implies $h$ has no ketchup) implies you are in Chicago. (Because chicago is the only place in the world where you are not allowed to have a hotdog with ketchup). Suppose you want to prove that. You start by assuming that $h$ is a hotdog and $h$ has no ketchup and you try to prove that means you are in Chicago. Well, you won't be able to do that because you can always get a hotdog without ketchup anywhere. You have to use that Chicago is the only place you have no choice. – fleablood Mar 19 '24 at 06:53
  • @AryanDas See the Addendum that I have just posted to the end of my answer. – user2661923 Mar 19 '24 at 14:10
  • @AryanDas We already have (too) many answers explaining how to prove $,(P\Rightarrow Q)\iff R,,$ e.g. here and here. $\ \ $ – Bill Dubuque Mar 19 '24 at 18:37
  • @BillDubuque As I indicated in the comment that I left in the cured chat room, you are misinterpreting the original poster's underlying problem. It is not that the original poster is questioning whether $~(P \implies Q) \iff R~$ is an accurate assertion. Instead, the original poster is (apparently) questioning whether the question presented in the posting's title should actually be interpreted as $~(P \implies Q) \iff R.~$ ...see next comment – user2661923 Mar 19 '24 at 18:54
  • @BillDubuque As I indicated in my Addendum, the original poster's confusion is reasonable, and resolution requires reasoning that one interpretation leads to a false assertion and the other interpretation leads to a true assertion. – user2661923 Mar 19 '24 at 18:55
  • @user2661923 I am not misinterpreting anything. I am merely emphasizing that no matter how one interprets the question it is a dupe of many prior questions so it should not have been answered. – Bill Dubuque Mar 19 '24 at 18:58
  • @BillDubuque Are you saying that the OP's problem of how to interpret an assertion in english so as to appropriately bracket logical sub-statements is a duplicate question? – user2661923 Mar 19 '24 at 19:09