The question is to find all solutions of each equation: $$444x = 148 \in \Bbb Z_{964}$$
$$39x = 37 \in \Bbb Z_{53}$$
I've googled the answer and got no results. I think I'm supposed to use extended gcd algorithm but I'm not sure how
The question is to find all solutions of each equation: $$444x = 148 \in \Bbb Z_{964}$$
$$39x = 37 \in \Bbb Z_{53}$$
I've googled the answer and got no results. I think I'm supposed to use extended gcd algorithm but I'm not sure how
I'll work the second one first. Note that $$53=39+14\\39=2\cdot14+11\\14=11+3\\11=3\cdot 3+2\\3=2+1\\2=2\cdot 1+0,$$ so $$1=3-2\\2=11-3\cdot 3\\3=14-11\\11=39-2\cdot14\\14=53-39.$$ Hence, by repeated substitution, we have $$\begin{align}1 &= 3-2\\ &= 3-(11-3\cdot 3)\\ &= 4\cdot 3-11\\ &= 4\cdot (14-11)-11\\ &= 4\cdot14-5\cdot11\\ &= 4\cdot14-5(39-2\cdot14)\\ &= 14\cdot14-5\cdot39\\ &= 14(53-39)-5\cdot39\\ &= 14\cdot53-19\cdot39.\end{align}$$ This means that in $\Bbb Z_{53},$ we have $1=39\cdot-19,$ so multiplying both sides of $39x=37\pmod{53}$ by $-19,$ we have $$\begin{align}x &= -19\cdot 37\pmod{53}\\ &= -703\pmod{53}\\ &= 14\cdot53-703\pmod{53}\\ &= 742-703\pmod{53}\\ &= 39\pmod{53},\end{align}$$ and so $x=39+53n$ for some $n\in\Bbb Z$.
For the first one, note that $$964=2\cdot 444+76\\444=5\cdot76+64\\76=64+12\\64=5\cdot12+4\\12=3\cdot4+0.$$ Hence, $4$ is the greatest common divisor of $964$ and $444$. In particular, working our way back through, we end up with $$4 = 76\cdot444-35\cdot964.$$ So multiplying both sides of $444x=148\pmod{964}$ by $76,$ we have $$\begin{align}4x &= 22\cdot 148\pmod{964}\\ &= 11248\pmod{964}\\ &= -11\cdot964+11248\pmod{964}\\ &= -10604+11248\pmod{964}\\ &= 644\pmod{964},\end{align}$$ so $4x=644+964n$ for some $n\in\Bbb Z,$ and so $x=161+241n$ for some $n\in\Bbb Z$.
Here is a start:
The Euclid-Wallis Algorithm is an implementation of the Extended Euclidean Algorithm. $$ \begin{array}{r} &&21&1&10\\\hline 1&0&1&-1&11\\ 0&1&-21&22&-241\\ 964&44&40&4&0\\ \end{array} $$ So we get that $$ (22)44+(-1)964=4 $$ Multiplying by $37$ and adding the homogenous solution, we get $$ (814-241k)44+(-37+11k)964=148 $$
Even if the numbers are changed, the process is the same: $$ \begin{array}{r} &&2&5&1&5&3\\\hline 1&0&1&-5&6&-35&111\\ 0&1&-2&11&-13&76&-241\\ 964&444&76&64&12&4&0\\ \end{array} $$ So we get that $$ (76)444+(-35)964=4 $$ Multiplying by $37$ and adding the homogenous solution, we get $$ (2812-241k)444+(-1295+111k)964=148 $$ We can adjust $k$ to get a smaller particular solution: $$ (161-241k)444+(-74+111k)964=148 $$