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≥0 for 133x+203y=42?
How do I find solutions a,b to the equation 19a+29b=1 by hand?
Answer
Correct. Note 19x+29y=6⇒mod 19: y≡629≡610≡1220≡121≡−7 so y=−7+19n, therefore x=6−29y19=6−29(−7+19n))19=11−29n.
Beware One can employ fractions x≡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 ax≡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