I am attempting to solve this question by "playing around" with the numbers so I get $46x\equiv 208\pmod {202}$ then divided by 2 since gcd = 2 to get $23x\equiv 104\pmod {202}$. I don't know how to go further from this. Have I done something wrong?
-
4You need to divide the modulus out by $2$ as well. – Adam Hughes Jan 16 '17 at 18:40
-
Dividing normally by 2 is illegal; you should have 23x==104 mod 101 or 23x==3 mod 101. – snowfall512 Jan 16 '17 at 18:41
-
1As people are saying, you should divide 2 from the modulus as well. Other than that, the next step would be to find the inverse of 23 (mod 101). You may want to look up the extended Euclidean algorithm. – Mike Jan 16 '17 at 18:49
-
Thanks guys for your input, so I have now that 1=22x23 - 5x101. So 22 is the inverse of 23, do I simply now just times 22 by 3 to get 66 which is 1 solution? – Sujjan Shaikh Jan 16 '17 at 18:56
-
@pie314271: But $104\equiv 3\pmod{101}$, so that's the same equation. – hmakholm left over Monica Jan 16 '17 at 19:52
-
@HenningMakholm: But that's exactly what you end up getting from the equation above unfortunately. You do have a point though. – snowfall512 Jan 16 '17 at 20:09
-
@pie314271: I don't see anything unfortunate here. – hmakholm left over Monica Jan 16 '17 at 20:12
-
@HenningMakholm: In other words, this part is mostly useless (though it does simplify the work). – snowfall512 Jan 16 '17 at 20:13
3 Answers
As already noticed, $$46x\equiv6\mod 2002\iff 23x\equiv 3\mod 101.$$ There remains to find the inverse of $23$ modulo $101$. This is obtained with the Extended Euclidean algorithm: \begin{array}{rrrl} \hline r_i&u_i&v_i&q_i\\\hline101&0&1\\23&1&0&4\\\hline 9&-4&1&2\\5&9&-2&1\\4&-13&3&1\\1&22&-5\\\hline \end{array} The last row yields the coefficients of a Bézout's relation between $13$ and $101$: $$22\times 23-5\times101=1,$$ whence the inverse of $23$ mod $101$: $22$, and the solution of the congruence: $$x\equiv 22\times3=66\mod 101.$$

- 175,478
You must cancel $\,2\,$ from the modulus too, as is clear by converting to equation form, i.e.
$\ 46x\equiv 6\pmod{\!202}\!\iff\! 46x\!-\!202y=6\!\!\!\overset{\,\large \div\, 2}\iff\! 23x\!-\!101y=3\!\iff\! \color{#c00}{23x\equiv 3}\pmod{\!101}$
Finally below we give a couple convenient ways to compute the fraction $\, \color{#c00}{x\equiv 3/23}\pmod{101}$
${\rm mod}\,\ 101\!:\ \ \color{#c00}{\dfrac{3}{23}}\!\!\!\overset{\ \ \ \times 4_{\phantom{._{._.}}}}\equiv\!\!\dfrac{12}{92}\equiv\,\dfrac{12}{-9}\,\equiv\, \dfrac{4}{-3}\equiv\dfrac{105}{-3}\equiv\color{#0a0}{-35}\ $ by Gauss's algorithm. $ $ Alternatively
${\rm mod}\,\ 101\!: \ \dfrac{0}{101} \overset{\large\frown}\equiv \underbrace{\color{#c00}{\dfrac{3}{23}}\overset{\large\frown}\equiv \dfrac{-12}9\equiv \color{#90f}{\dfrac{-4}3}\overset{\large\frown}\equiv \color{#0a0}{\dfrac{35}{-1}}} _{\Large \begin{align}\color{#c00}3\ \ \ \ \ -\ \ \ \ \ &8(\color{#90f}{-4})\ \ \ \ =\ \ \ \, \color{#0a0}{35}\\ \color{#c00}{23}\ \ \ \ -\ \ \ \ \ &8\ (\ \color{#90f}3\ )\ \ \ \ =\ \ \, \color{#0a0}{-1}\end{align}}\ $ by the fractional extended Euclidean algorithm
where the underbace shows the basic reduction step, i.e. perform Euclid's algorithm to reduce the denominator sequence, doing the same in parallel to the numerators (explained in the prior link). Above we also used an intermediate step (cancelling $\,3\,$ from $-12/9\,$ to get $\color{#90f}{-4/3})\,$ before applying the underlined Euclidean reduction step (cancelling $\,3\,$ is valid because $3$ is coprime to $101).$
Beware $\ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.

- 272,048
The congruence $46x\equiv 6\bmod{202}$ is equivalent to $$ 46x=202y+6 $$ for some integer $y$, which in turn is equivalent to $$ 23x=101y+3 $$ that is $23x \equiv 3\bmod{101}$.

- 15,423
- 3
- 24
- 57