Sunday, March 25, 2018

elementary number theory - solving and manipulating linear congruences



I need to find a multiple of 5 call it 5k with the following properties:




  1. 5k3 mod 6

  2. 5k2 mod 7



My first instinct is to start with the Chinese Remainder Theorem, but I do not know how to start. Could I get a few hints? Please explain the modular arithmetic manipulations needed to solve this problem.



Answer



To make the computations easy to understand, we first consider general equations.



Let a,b,n be integers.
Suppose gcd(a,n)=1.
Consider the following equation.



axb (mod n)



Since gcd(a,n)=1, we can solve ay1 (mod n) by Euclid's algorithm.

Then x=by (mod n) is the solution.



Let a,b,n,m be integers.
Suppose gcd(n,m)=1.
Consider the following equatiuons.



xa (mod n)



xb (mod m)




Since gcd(n,m)=1, we can find, by Euclid's algorithm, integers k,l such that



mk1 (mod n)



nl1 (mod m)



Then x=amk+bnl (mod nm) is the solution.



Now let's solve the given equations




5k3 (mod 6)



5k2 (mod 7)



We get(by Euclid's algorithm or just by testing)



k3 (mod 6)



k6 (mod 7)




Then we can apply the above method to find k.
Since



71 (mod 6)



61 (mod 7)



k=3766=1527 (mod 42)


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...