2

"Solve the following congruence. Make sure that the number you enter is in the range $[0,M−1]$ where $M$ is the modulus of the congruence. If there is more than one solution, enter the answer as a list separated by commas. If there is no answer, enter $N.$"
$102x = 220 \pmod{266}$
$x = ?$

So I've tried using Euclidean's algorithm on this nearly 10 times already(no exaggeration) but every time I try getting past the point below the whole thing falls apart and I just end up getting another incorrect answer for x. Would anyone mind showing how to continue on from this point and if there are any methods other than Euclidean's that one can use to calculate such equations, thanks :)

$102x = 220\pmod{266}$

$\gcd(102,266) = 2$

$266 = (102 \times 2) + 62$
$102 = (62 \times 1) + 40$
$62 = (40 \times 1) + 22$
$40 = (22 \times 1) + 18$
$22 = (18 \times 1) + 4$
$18 = (4 \times 4) + 2$
$4 = (2 \times 2) + 0$

Joffan
  • 39,627
UpUp
  • 49
  • Use instead the linked forward extended Euclidean algorithm. The backward version is notoriously error-prone. Or use one of the many other methods in the linked posts. – Bill Dubuque Feb 15 '21 at 23:08
  • $\dfrac{220}{102}\bmod 266 \equiv 10\left[\dfrac{11}{51}\right]\bmod{133} \equiv 10[\color{#c00}{-5}],,$ by $\bmod 133!:\ \dfrac{11}{51}\equiv \dfrac{33}{153}\equiv\color{#c00}{\dfrac{-100}{20}},$ by Gauss's algorithm, as explained in the links. Took only $10$ seconds of trivial mental arithmetic. Learn those methods and you too can do it just as quickly. – Bill Dubuque Feb 16 '21 at 00:14

1 Answers1

2

You can solve this in the moduli of prime power factors of $266$ and recombine with the Chinese remainder theorem.

$266 = 2\cdot 7 \cdot 19$.

$102x \equiv 220 \implies 0x \equiv 0 \bmod 2$ (so $x$ unconstrained)
$102x \equiv 220 \implies 4x \equiv 3 \bmod 7$
$102x \equiv 220 \implies 7x \equiv 11 \bmod 19$

Solve the two remaining congruences which will give you a value for $x \bmod 133$ and find the two answers for $x \bmod 266$ from $x\in\{0,1\}\bmod 2$

Joffan
  • 39,627