I'm trying to find which of $133x+203y=38$, $133x+203y=40$, $133x+203y=42$, and $133x+203y=44$ have integer solutions. I know that only the third equation suffices for these conditions because $gcd(133,203)=7$ which only divides $42$, but how do I find the solution with smallest possible $x\geq 0$ for $133x+203y=42$?
How do I find solutions $a,b$ to the equation $19a+29b=1$ by hand?
Answer
Correct. Note $\rm\ 19x\!+\!29y=6\, \Rightarrow\, mod\ 19\!:\ y \equiv \dfrac{6}{29}\equiv \dfrac{6}{10}\equiv \dfrac{12}{20}\equiv \dfrac{12}{1}\equiv -7\,\ $ so $\rm\,\ \color{#c00}{y = -7\!+\!19n},\:$ therefore $\rm\ x\, =\, \dfrac{6\!-\!29\,\color{#c00}y}{19} = \dfrac{6\!-\!29(\color{#c00}{-7+19n}))}{19}\, =\, 11\!-\!29n.$
Beware $\ $ One can employ fractions $\rm\ x\equiv b/a\ $ in modular arithmetic (as above) only when the fractions have denominator $ $ coprime $ $ to the modulus $ $ (else the fraction may not (uniquely) exist, $ $ i.e. the equation $\rm\: ax\equiv b\,\ (mod\ m)\:$ might have no solutions, or more than one solution). The reason why such fraction arithmetic works here (and in analogous contexts) will become clearer when one learns about the universal properties of fraction rings (localizations).
The above method is a special case of Gauss's algorithm for computing inverses. This always works for prime moduli, but may fail for composite moduli (in which case one may employ the extended Euclidean algorithm to compute inverses). Gauss's algorithm is often more efficient for manual calculations with small numbers.
No comments:
Post a Comment