Monday, April 25, 2016

How do I divide across equivalence in modular arithmetic



I understand how to solve for k for something like 2k4mod. This would become k \equiv 2 \bmod 8. But how would I solve for k for something like 3k \equiv 1 \bmod 16?



Answer



If you have 2k\equiv 4 \pmod {16}, then for some integer m,



2k=16m+4
which means k=8m+2. Now if you have 3k\equiv 1\pmod{16}, we can multiply by 5 to get
15k\equiv -k\equiv 5 \pmod {16}
and thus



k\equiv -5\equiv 11\pmod{16}
Or k=16m+11.




In general, a has a multiplicative inverse mod p iff (a,p)=1.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f \colon A \rightarrow B and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...