3454x≡2(mod4666)

asked by guest
on Apr 07, 2025 at 10:49 am



You asked:

Solve the linear congruence 3454x2(mod4666)3454 x \equiv 2 \pmod{4666}.

MathBot Answer:

There are multiple solutions for xx in the congruence relation 3454x2(mod4666)3454 x \equiv 2 \pmod{4666}: x{1128,3461}\textcolor{#228B22}{x \in \left\{ 1128, 3461\right\} }


Remove the greatest common factor shared between the left-hand side, the right-hand side, and the modulus. Dividing each by 22 yields 1727x1(mod2333)1727 x \equiv 1 \pmod{2333}. From this, we know that 3454x2(mod4666)3454 x \equiv 2 \pmod{4666} has 22 solutions.

This is a different expression in a different modulus, but can be used to compute the solutions.


We want to find xx, and we have 1727x1727 x. In normal arithmetic, we would divide to get the answer.
However, division is not well-defined for every number in modular arithmetic. Division in modular arithmetic is better defined by the modular multiplicative inverse.


Modular Multiplicative Inverse

Definition

The modular multiplicative inverse of a given number aa is written as a1a^{-1}, for which aa11(modn)a \cdot a^{-1} \equiv 1 \pmod{n}.

Solution

A number aa has a modular multiplicative inverse a1a^{-1} if and only if aa and nn are coprime.

For a given base a=1727a = 1727 and a modulus n=2333n = 2333, the modular multiplicative inverse can be computed using the Extended Euclidean Algorithm, shown below.


Extended Euclidean Algorithm

Definition

The Extended Euclidean Algorithm is used to compute two integers, ss and tt, for which the equation as+nt=gcd(a,n)a s + n t = \operatorname{gcd}(a, n) is true. It will also produce the modular multiplicative inverse of a(modn)a \pmod n, provided aa and nn are coprime.

This is because coprime numbers have a GCD of 1, making the equation 1727s+2333t=11727 s + 2333 t = 1.
You may notice that when ss and tt are integers, this is a definition for 1727s1(mod2333)1727 s \equiv 1 \pmod{ 2333 }.
According to the definition of modular multiplicative inverse, ss is the modular multiplicative inverse of 17271727 in mod 23332333.

Solution

To set up the initial state, we set s0=1s_0 = 1, t0=0t_0 = 0, s1=0s_1 = 0, and t1=1t_1 = 1.
For a given step ii: ri+1=ri1qirisi+1=si1qisiti+1=ti1qiti \begin{align*} r_{i+1} = r_{i-1} - q_{i} r_{i} \\ s_{i+1} = s_{i-1} - q_{i} s_{i} \\ t_{i+1} = t_{i-1} - q_{i} t_{i} \end{align*}
Then, we continue until the remainder is 00. iquotient (q)remainder (r)st0172710123330120172710316061142515325191436560231771312720812950379127757101411128835112023331727\begin{array}{|c|c|c|c|c|}\hline i & \textnormal{quotient }\left(q\right) & \textnormal{remainder }\left(r\right) & s & t \\\hline 0 & & 1727 & 1 & 0 \\\hline 1 & & 2333 & 0 & 1 \\\hline 2 & 0 & 1727 & 1 & 0 \\\hline 3 & 1 & 606 & -1 & 1 \\\hline 4 & 2 & 515 & 3 & -2 \\\hline 5 & 1 & 91 & -4 & 3 \\\hline 6 & 5 & 60 & 23 & -17 \\\hline 7 & 1 & 31 & -27 & 20 \\\hline 8 & 1 & 29 & 50 & -37 \\\hline 9 & 1 & 2 & -77 & 57 \\\hline 10 & 14 & 1 & 1128 & -835 \\\hline 11 & 2 & 0 & -2333 & 1727 \\\hline \end{array} The GCD is 11, in the remainder column in the second-to-last row, and the value of ss is 11281128 in the second-to-last row, under the ss column.

Checking against the congruence relation 1727s1(mod2333)1727 s \equiv 1 \pmod{ 2333 }, we can see that 17271128=19480561(mod2333)1727 \cdot 1128 = 1948056 \equiv 1 \pmod{ 2333 }.

Multiplying both sides of the relation 1727x1(mod2333)1727 x \equiv 1 \pmod{2333} by the modular multiplicative inverse gives us x1128(mod2333)x \equiv 1128 \pmod{ 2333 }.


We were originally solving 3454x2(mod4666)3454 x \equiv 2 \pmod{4666}. In mod 46664666, there are 22 numbers that are solutions. Given that there is one unique solution in mod 23332333, the other solution is equivalent in mod 23332333, but distinct in mod 46664666. These distinct solutions can be produced by adding the modulus 23332333 to the result until the result is no longer less than 46664666, meaning the solutions to 3454x2(mod4666)3454 x \equiv 2 \pmod{4666} are 1128,34611128, 3461.

These solutions can be verified by plugging them back into the original reduced equation 3454x2(mod4666)3454 x \equiv 2 \pmod{4666}: 34541128=  3896112  2(mod4666)34543461=  11954294  2(mod4666)\begin{align*} & 3454 \cdot 1128 & = \; & 3896112 & \equiv \; & 2 \pmod{ 4666 } \\ & 3454 \cdot 3461 & = \; & 11954294 & \equiv \; & 2 \pmod{ 4666 } \\ \end{align*}