How to solve the following congruence's equation system?

180 Views Asked by At

Through many operations in an exercise I've reached this point

$17≡4a+19b(mod$ $27)$

$8≡11a(mod$ $27)$

I want to find both a and b to have the answer I need, I've been trying to use the Chinese rest theorem but found it doesn't work in my case, I'm starting converting the second one into

$11a+27a≡1(mod$ $27)$

Despite this I'm not sure if is correct and I still don't know how to clear this $a$ in the second equation in order to replace it in the first.

Any help will be really appreciated

4

There are 4 best solutions below

4
On BEST ANSWER

There are a number of ways to go about this. We want to be able to "divide" by $11$, so we need $8 + 27x = 11y$. Solving this linear Diophantine equation (an elementary problem, feel free to Google) gives $x = 5$ and $y = 13$ as possible solutions. Then, \begin{align} 8 &\equiv 11a \mod{27}\\ 8 + 27\cdot 5 &\equiv 11a \mod{27}\\ 13(11) &\equiv 11a \mod{27}\\ 13 &\equiv a \mod{27} \end{align} Then $a = 13 + 27k$ for some $k \in \mathbb{Z}$. You can subtract $4$ times the last congruence above from $17 \equiv 4a + 19b \mod{27}$ to get \begin{align} 17 - 4(13) &\equiv 19b \mod{27}\\ -35 &\equiv 19b \mod{27}\\ -35 + 2(27) &\equiv 19b \mod{27}\\ 19 &\equiv 19b \mod{27}\\ b &\equiv 1 \mod{27} \end{align}

0
On

Guide:

\begin{align} 27 &= 11(2)+5 \\ 11 &= 2(5)+1 \end{align}

\begin{align} 1 &= 11-2(5)\\ &= 11 - 2(27-2(11)) \\ &= 5(11)-2(27) \end{align}

Hence $$11^{-1} \equiv 5 \pmod{27}$$

Now you should be able to solve for $a$, substitute that to the first equation and solve for $b$ using similar procedure.

4
On

\begin{align*} 11a & \equiv 8 \pmod{27}\\ 55a & \equiv 40 \pmod{27}\\ a & \equiv 13 \pmod{27}. \end{align*} Now plug this in the first congruence to get $b$.

1
On

Just so long as you avoid multiplying or dividing by a multiple of $3$ you can use ordinary arithmetic - so you can multiply the first by $11$ and the second by $4$ to isolate a term in $b$ using standard elimination. You avoid $3$ because the base $27$ has the prime factor $3$.

You can solve $ax+by=1$ for coprime $a$ and $b$ using the division algorithm to find their highest common factor (which is $1$ because they are coprime). Other methods are available, and sometimes work more quickly if you spot them. The division algorithm provides a proof that there is always a solution, and a systematic way of finding it.