Sunday, 26 March 2017

elementary number theory - Solving congruence system with no multiplicative inverse




I am trying to find a way of solving congruence systems of the form:



bx=amody




Where b and y are not prime to each other.



My current way of solving congruence systems where b and y are prime to each other is to find the multiplicative inverse of b in y and multiply b (which will make it 1) and a with this value.



Example:



13 x=3 mod 17



I calculate the mul. inverse of 13 and multiply 3 and 13 times that value and thus I have solved this equation.




But I dont know how I can do that where b and y are not prime to each other.



Example:



3x=3 mod 9



How would I solve this ?


Answer



A congruence

axb(modn)
is soluble iff gcd(a,n)b. In this case (1) is equivalent to
agxbg(modng)
where g=gcd(a,n). As a/g is coprime to n/g you may solve (2)
by multiplicative inverses if you like.


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

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