-2

We can solve the linear congruence with Euler's phi function: $$105\hspace{3pt} X ≡ 15\hspace{3pt} mod \hspace{3pt}24 $$ Where $$a = 105, b=15,m=24$$ As $$\phi(m)=\phi(24)=8\rightarrow (105)^7 ≡ 9\hspace{3pt} mod \hspace{3pt}24 $$ $$\rightarrow X ≡ 15\hspace{3pt}\hspace{3pt}(9)\hspace{3pt} mod \hspace{3pt}\hspace{3pt}\hspace{3pt}24 ≡ 15\hspace{3pt} mod \hspace{3pt}24$$ The solution is: $$ X ≡ 7\pm 8 N $$ Where N is a natural number.$$$$ But when we try to solve this linear congruence with Euler's phi function: $$192\hspace{3pt} X ≡ 24\hspace{3pt} mod \hspace{3pt}27 $$ Where $$a = 192, b=24,m=27$$ We find that $$\phi(m)=\phi(27)=18\rightarrow (192)^{17} ≡ 0\hspace{3pt} mod \hspace{3pt}27 $$ That's mean we cannot solve this second linear congruence with Eules's phi function$$$$ I know that the solution for the second linear congruence is: $$ X ≡ 8\pm 9 N $$ I do not know why i can not solve this second linear congruence with Euler's phi function ? Can any one help me?

AAA
  • 17
  • That method works only when $a$ is invertible $\bmod n$, i.e. coprime to $n.,$ See the linked dupe for how to handle the noninvertible case. – Bill Dubuque Mar 07 '21 at 15:27
  • 1
    Here is a proof that $a$ is invertible $!\bmod n\iff \gcd(a,n) = 1.,$ Note that Euler's $\phi$ theorem only applies to elements $,a,$ coprime to $n$, i.e. invertibles. They have finite order, and knowing any multiple $k$ of the order (e.g. $,k=\phi(a)),$ we have $,a^k\equiv 1,$ so $,a^{-1}\equiv a^{k-1}\pmod n\ \ $ – Bill Dubuque Mar 07 '21 at 15:34
  • There are more efficient ways to solve such linear congruences, e.g. see here or here. – Bill Dubuque Mar 07 '21 at 15:41

2 Answers2

1

The problem is that $(192,27)=3\gt1$. That's $192$ and $27$ are not coprime. Thus Euler is not directly applicable. $192$ doesn't have an inverse $\bmod27$.

In fact you run into the same problem on the first one. Recall that the theorem says that $a^{\varphi(n)}\equiv1\bmod n\color{blue}{\text{ when }(a,n)=1}$.

One way is to invoke CRT when this happens.

  • My question is: What is difference between the two linear congruences, which make the first solvable with phi function and the second is unsolvable with phi function? – AAA Mar 07 '21 at 16:07
  • In the first problem, $105$ and $24$ are not coprime either, in fact. So I think there's an error in that solution. –  Mar 07 '21 at 16:11
  • gcd(105,24)=3>1, not coprime – AAA Mar 07 '21 at 16:13
  • Yeah I had missed that. You can't apply Euler there directly either. –  Mar 07 '21 at 16:31
  • but we can solve the first linear congruence with phi function as mentioned – AAA Mar 07 '21 at 16:50
0

First you can divide all by three to make things easier:

$$192x=24\pmod{27}\iff 192x=24+27k\,,\,\,k\in\Bbb Z\stackrel{\div3}\implies 64x=8+9k$$

and since $\;64=1\pmod 9\;$ , we get

$$64x=8\pmod 9\implies x=8\pmod 9$$

and we get the solution.

DonAntonio
  • 211,718
  • 17
  • 136
  • 287