Solving a congruence relation of the first degree (step-by-step solution?)

526 Views Asked by At

Solve the following congruence: $508x + 124 \equiv 0 \pmod{668}$. Note the solution in a numeral system of the lowest non-negative remainders of the aforementioned module.

3

There are 3 best solutions below

2
On

Cancel by $4$: $$127x +31\equiv 0\pmod{167}$$ subtract 127 by 167 $$-40x +31\equiv 0\pmod{167}$$ multiply by 4 $$-160x +124\equiv 0\pmod{167}$$ so $$7x-43\equiv 0\pmod{167}$$ multiply by $24$ $$168x\equiv 1032\pmod{167}$$ so $$x\equiv 30\pmod{167}$$

So $x = 167t+30$, $t\in \mathbb{Z}$

0
On

First, it is equivalent to the congruence (dividing by the g.c.d. of the coefficients): $$127x+31\equiv0\pmod{167}\iff127x\equiv -31\pmod{167}.$$ Next step: find the inverse of $127\bmod 167$. This is done through the extended Euclidean algorithm, which yields the coefficients of a Bézout's relation between $127$ and $167$: $$-71\cdot 127+54\cdot 167=1$$ so the inverse of $127$ is $-71$, and the solution is $$x\equiv -71(-31)\pmod{167}=2201\equiv 30\pmod{167}.$$

0
On

The answer given by Bernard is great, and I would just add one thing to it. We find that we need $x\equiv 30\pmod{167}$, but I believe you're looking for solutions modulo $668$. Since $668=167\cdot 4$, our four solutions will be $30+167k$, for $k=0,1,2,3$. This gives us:

$$x\equiv 30, 197, 364, 531\pmod{668}$$