Saturday, 30 May 2015

How do I divide across equivalence in modular arithmetic



I understand how to solve for k for something like 2k4mod16. This would become k2mod8. But how would I solve for k for something like 3k1mod16?


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

real analysis - How to find lim_{hrightarrow 0}frac{sin(ha)}{h}

How to find \lim_{h\rightarrow 0}\frac{\sin(ha)}{h} without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...